Class URL
Properties
fragment
fragment: string
The hash string starting with a # of the URL, if present. When setting, if the string does not begin with a # it will be added, and the value
hostname
hostname: string
Host (domain name) portion of the URL
Methods
Staticparse
Creates a new URL object with provided URL.
Parameters
- url: string
A string representing an absolute URL or a relative reference to a base URL. If
urlis a relative reference,baseis required. Optionalbase: stringA string representing the base URL to resolve against if
urlis a relative reference.
Returns URL
- url: string

URL objects are used as a convenience in parsing values out of a URL string. This implementation closely mirrors the Web API's
URLobject for compatibility purposesExample