class js.html.Location

Available on js

Returns a Location object, which contains information about the URL of the document and provides methods for changing that URL. You can also assign to this property to load another URL.

Documentation for this class was provided by MDN.

Instance Fields

var hash:String

the part of the URL that follows the # symbol, including the # symbol.
You can listen for the hashchange event to get notified of changes to the hash in supporting browsers.

var host:String

the host name and port number.

var hostname:String

the host name (without the port number or square brackets).

var href:String

the entire URL.

var pathname:String

the path (relative to the host).

var port:String

the port number of the URL.

var protocol:String

the protocol of the URL.

var search:String

the part of the URL that follows the ? symbol, including the ? symbol.

function assign(url:String):Void

function reload():Void

function replace(url:String):Void

function toString():String