Class: URLInfo

URLInfo(href, protocol, hostnameopt)

A URLInfo object represents information about a URL. It is returned by parseURL.

Constructor

new URLInfo(href, protocol, hostnameopt)

Creates a URLInfo object.
Parameters:
Name Type Attributes Description
href string The entire URL.
protocol string The protocol scheme of the URL, including the final :.
hostname string <optional>
The hostname of the URL.
Source:

Members

hostname :string

The hostname of the URL.
Type:
  • string
Source:

href :string

The entire URL.
Type:
  • string
Source:

protocol :string

The protocol scheme of the URL, including the final :.
Type:
  • string
Source:

Methods

toString() → {string}

Returns the entire URL.
Source:
Returns:
The entire URL.
Type
string