CrossOriginLocation class
A safe wrapper for a cross-origin location obtained through a cross-origin window.
Since cross-origin access is limited by the browser, the Dart runtime can't provide a type for or null-assert the cross-origin location. To safely interact with the cross-origin location, use this wrapper instead.
The dart:html
equivalent is _LocationCrossFrame
.
Only includes allowed APIs from the W3 spec located here: https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossoriginproperties-(-o-) Some browsers may provide more access.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- href ← String
-
Sets the Location.href value of this cross-origin location to
value
.no getter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unsafeLocation → JSAny?
-
The unsafe location value that this wrapper wraps that should only ever be
typed as
JSAny?
.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replace(
String url) → void -
Calls Location.replace on this cross-origin location with the given
url
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited