Skip to content
SiteEmail

Location

Location for document.

#include <Location.idl>

Name
voidassign(USVString url)
Navigates to the given URL.
voidreplace(USVString url)
Removes the current page from the session history and navigates to the given URL.
voidreload(optional Bool forceReload)
Reloads the current page.
Name
attribute USVStringhref
Whole url of the document.
readonly attribute USVStringorigin
URL’s origin.
attribute USVStringprotocol
URL’s protocol.
attribute USVStringhost
URL’s host and port (if different from the default port for the scheme)
attribute USVStringhostname
URL’s host.
attribute USVStringport
URL’s port.
attribute USVStringpathname
URL’s path.
attribute USVStringsearch
URL’s query (includes leading ”?” if non-empty)
attribute USVStringhash
URL’s fragment (includes leading ”#” if non-empty)
readonly attribute sequence< USVString >ancestorOrigins
void assign(
USVString url
)

Navigates to the given URL.

void replace(
USVString url
)

Removes the current page from the session history and navigates to the given URL.

void reload(
optional Bool forceReload
)

Reloads the current page.

attribute USVString href;

Whole url of the document.

readonly attribute USVString origin;

URL’s origin.

attribute USVString protocol;

URL’s protocol.

attribute USVString host;

URL’s host and port (if different from the default port for the scheme)

attribute USVString hostname;

URL’s host.

attribute USVString port;

URL’s port.

attribute USVString pathname;

URL’s path.

attribute USVString search;

URL’s query (includes leading ”?” if non-empty)

attribute USVString hash;

URL’s fragment (includes leading ”#” if non-empty)

readonly attribute sequence< USVString > ancestorOrigins;