JavaScript APIs / oro:location

oro:location

oro:location normalizes the current runtime location and origin semantics across platforms.

Examples#

Inspect the runtime-normalized location values for the current context:

import location from 'oro:location'

console.log(location.href)
console.log(location.origin)

API reference#

Module specifiers#

oro:location

TypeScript declarations#

These declarations are generated from the runtime's published TypeScript surface.

oro:location#

declare module "oro:location" {
    export class Location {
        get url(): URL;
        get protocol(): string;
        get host(): string;
        get hostname(): string;
        get port(): string;
        get pathname(): string;
        get search(): string;
        get origin(): any;
        get href(): any;
        get hash(): string;
        toString(): any;
    }
    const _default: Location;
    export default _default;
}

See also#

Source repository · Edit this page · View Markdown