Location
Location for document.
#include <Location.idl>
Public Functions
Name | |
---|---|
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. |
Public Attributes
Name | |
---|---|
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 |
Public Functions Documentation
function assign
void assign(
USVString url
)
Navigates to the given URL.
function replace
void replace(
USVString url
)
Removes the current page from the session history and navigates to the given URL.
function reload
void reload(
optional Bool forceReload
)
Reloads the current page.
Public Attributes Documentation
variable href
attribute USVString href;
Whole url of the document.
variable origin
readonly attribute USVString origin;
URL’s origin.
variable protocol
attribute USVString protocol;
URL’s protocol.
variable host
attribute USVString host;
URL’s host and port (if different from the default port for the scheme)
variable hostname
attribute USVString hostname;
URL’s host.
variable port
attribute USVString port;
URL’s port.
variable pathname
attribute USVString pathname;
URL’s path.
variable search
attribute USVString search;
URL’s query (includes leading “?” if non-empty)
variable hash
attribute USVString hash;
URL’s fragment (includes leading “#” if non-empty)
variable ancestorOrigins
readonly attribute sequence< USVString > ancestorOrigins;