Constructors
constructor
- new URL(url: string, base?: string | URL): URL
-
Parameters
-
url: string
-
Optional
base: string | URL
Returns URL
Properties
Readonly
[toStringTag]
[toStringTag]: "URL"
Accessors
hash
- get hash(): string
-
Returns string
- set hash(V: string): void
-
Returns void
host
- get host(): string
-
Returns string
- set host(V: string): void
-
Returns void
hostname
- get hostname(): string
-
Returns string
- set hostname(V: string): void
-
Returns void
href
- get href(): string
-
Returns string
- set href(V: string): void
-
Returns void
origin
- get origin(): string
-
Returns string
password
- get password(): string
-
Returns string
- set password(V: string): void
-
Returns void
pathname
- get pathname(): string
-
Returns string
- set pathname(V: string): void
-
Returns void
port
- get port(): string
-
Returns string
- set port(V: string): void
-
Returns void
protocol
- get protocol(): string
-
Returns string
- set protocol(V: string): void
-
Returns void
search
- get search(): string
-
Returns string
- set search(V: string): void
-
Returns void
username
- get username(): string
-
Returns string
- set username(V: string): void
-
Returns void
Methods
toJSON
- toJSON(): string
-
Returns string
The URL class as specified by WHATWG
See
URL on MDN