Location class
Location class
Location objects provide a representation of the address of the active document of their Document’s browsing context, and allow the current entry of the browsing context’s session history to be changed, by adding or replacing entries in the history object.
Inheritance: Location
→
DOMObject
The Location type exposes the following members:
Properties
Property | Description |
---|---|
href | Returns the Location object’s URL. Can be set, to navigate to the given URL. |
origin | Returns the Location object’s URL’s origin. |
protocol | Returns the Location object’s URL’s scheme. Can be set, to navigate to the same URL with a changed scheme. |
host | Returns the Location object’s URL’s host and port (if different from the default port for the scheme). Can be set, to navigate to the same URL with a changed host and port. |
hostname | Returns the Location object’s URL’s host. Can be set, to navigate to the same URL with a changed host. |
port | Returns the Location object’s URL’s port. Can be set, to navigate to the same URL with a changed port. |
pathname | Returns the Location object’s URL’s path. Can be set, to navigate to the same URL with a changed path. |
search | Returns the Location object’s URL’s query (includes leading “?” if non-empty). Can be set, to navigate to the same URL with a changed query(ignores leading “?”). |
hash | Returns the Location object’s URL’s fragment (includes leading “#” if non-empty). Can be set, to navigate to the same URL with a changed fragment(ignores leading “#”). |
Methods
Method | Description |
---|---|
get_platform_type | This method is used to retrieve ECMAScript object Type. |
assign | Navigates to the given page. |
replace | Removes the current page from the session history and navigates to the given page. |
reload | Reloads the current page. |
See Also
- module
aspose.svg.window
- class
DOMObject
- class
Location