Location extension type
The Location
interface represents the location (URL) of the object it
is linked to. Changes done on it are reflected on the object it relates to.
Both the Document and Window interface have such a linked Location
,
accessible via Document.location and Window.location respectively.
Properties
- ancestorOrigins → DOMStringList
-
no setter
- hash ↔ String
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- host ↔ String
-
getter/setter pair
- hostname ↔ String
-
getter/setter pair
- href ↔ String
-
getter/setter pair
- origin → String
-
no setter
- pathname ↔ String
-
getter/setter pair
- port ↔ String
-
getter/setter pair
- protocol ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- search ↔ String
-
getter/setter pair
Methods
-
assign(
String url) → void -
The
assign()
method of the Location interface causes the window to load and display the document at the URL specified. After the navigation occurs, the user can navigate back to the page that calledLocation.assign()
by pressing the "back" button. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → void -
The
reload()
method of the Location interface reloads the current URL, like the Refresh button. -
replace(
String url) → void -
The
replace()
method of the Location interface replaces the current resource with the one at the provided URL. The difference from the Location.assign method is that after usingreplace()
the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited