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