Location class
The location (URL) of the object it is linked to. Changes done on it are
reflected on the object it relates to. Accessible via
globalThis.location
.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Location()
-
factory
Properties
- ancestorOrigins → DOMStringList
-
Available on Location, provided by the Location$Typings extension
Returns a DOMStringList object listing the origins of the ancestor browsing contexts, from the parent browsing context to the top-level browsing context.no setter - assign ↔ void Function(String)
-
Available on Location, provided by the Location$Typings extension
getter/setter pair - hash ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's fragment (includes leading "#" if non-empty).getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- host ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's host and port (if different from the default port for the scheme).getter/setter pair - hostname ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's host.getter/setter pair - href ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL.getter/setter pair - origin → String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's origin.no setter - pathname ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's path.getter/setter pair - port ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's port.getter/setter pair - protocol ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's scheme.getter/setter pair - reload → ({void Function() $1, void Function(bool forcedReload) $2})
-
Available on Location, provided by the Location$Typings extension
Overload accessor: $1, $2no setter - replace ↔ void Function(String)
-
Available on Location, provided by the Location$Typings extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- search ↔ String
-
Available on Location, provided by the Location$Typings extension
Returns the Location object's URL's query (includes leading "?" if non-empty).getter/setter pair - toString$ ↔ String Function()
-
Available on Location, provided by the Location$Typings extension
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited