Home Reference Source Repository
public class | source

Url

Helper class providing URLUtils object implementation. Used in document.location, HTMLAnchorElement etc.

See:

Constructor Summary

Public Constructor
public

Creates object using given value as start url.

Member Summary

Public Members
public get

The authentication information portion of a URL.

public get

Is a DOMString containing a '#' followed by the fragment identifier of the URL.

public get

Is a DOMString containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.

public get

Is a DOMString containing the domain of the URL.

public get

Is a DOMString containing the whole URL.

public get

Is a DOMString containing the password specified before the domain name.

public get

Is a DOMString containing an initial '/' followed by the path of the URL.

public get

port: string: *

Is a DOMString containing the port number of the URL.

public get

Is a DOMString containing the protocol scheme of the URL, including the final ':'.

public get

Is a DOMString containing a '?' followed by the parameters of the URL.

public get

Return 'params' part of href as object.

public get

Is a DOMString containing the username specified before the domain name.

Method Summary

Public Methods
public

Public Constructors

public constructor(url: string) source

Creates object using given value as start url.

Params:

NameTypeAttributeDescription
url string

url to parse.

Public Members

public get auth: string source

The authentication information portion of a URL.

public get hash: string source

Is a DOMString containing a '#' followed by the fragment identifier of the URL.

public get host: string source

Is a DOMString containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.

public get hostname: string source

Is a DOMString containing the domain of the URL.

public get href: string source

Is a DOMString containing the whole URL.

public get password: string source

Is a DOMString containing the password specified before the domain name.

public get pathname: string: * source

Is a DOMString containing an initial '/' followed by the path of the URL.

Return:

string

public get port: string: * source

Is a DOMString containing the port number of the URL.

Return:

string

public get protocol: string source

Is a DOMString containing the protocol scheme of the URL, including the final ':'.

Is a DOMString containing a '?' followed by the parameters of the URL.

Return:

string

public get searchParams: Object source

Return 'params' part of href as object.

public get username: string source

Is a DOMString containing the username specified before the domain name.

Public Methods

public toString(): string source

Return:

string

string representation of Url (Full URI)