Location
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
.
interface Location {
readonly ancestorOrigins: DOMStringList;
hash: string;
host: string;
hostname: string;
href: string;
readonly origin: string;
pathname: string;
port: string;
protocol: string;
search: string;
assign(url: string): void;
reload(): void;
reload(forcedReload: boolean): void;
replace(url: string): void;
toString(): string;
}var Location: {
readonly prototype: Location;
new (): never;
};§Properties
§
readonly ancestorOrigins: DOMStringList
[src]Returns a DOMStringList object listing the origins of the ancestor browsing contexts, from the parent browsing context to the top-level browsing context.
Always empty in Deno.
§
hash: string
[src]Returns the Location object's URL's fragment (includes leading "#" if non-empty).
Cannot be set in Deno.