@nextcloud/dialogs
    Preparing search index...

    Interface Navigator

    The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.

    MDN Reference

    interface Navigator {
        appCodeName: string;
        appName: string;
        appVersion: string;
        clipboard: Clipboard;
        cookieEnabled: boolean;
        credentials: CredentialsContainer;
        doNotTrack: string | null;
        geolocation: Geolocation;
        gpu: GPU;
        hardwareConcurrency: number;
        language: string;
        languages: readonly string[];
        locks: LockManager;
        login: NavigatorLogin;
        maxTouchPoints: number;
        mediaCapabilities: MediaCapabilities;
        mediaDevices: MediaDevices;
        mediaSession: MediaSession;
        mimeTypes: MimeTypeArray;
        onLine: boolean;
        pdfViewerEnabled: boolean;
        permissions: Permissions;
        platform: string;
        plugins: PluginArray;
        product: string;
        productSub: string;
        serviceWorker: ServiceWorkerContainer;
        storage: StorageManager;
        userActivation: UserActivation;
        userAgent: string;
        vendor: string;
        vendorSub: string;
        wakeLock: WakeLock;
        webdriver: boolean;
        canShare(data?: ShareData): boolean;
        clearAppBadge(): Promise<void>;
        getGamepads(): (Gamepad | null)[];
        javaEnabled(): boolean;
        registerProtocolHandler(scheme: string, url: string | URL): void;
        requestMediaKeySystemAccess(
            keySystem: string,
            supportedConfigurations: MediaKeySystemConfiguration[],
        ): Promise<MediaKeySystemAccess>;
        requestMediaKeySystemAccess(
            keySystem: string,
            supportedConfigurations: Iterable<MediaKeySystemConfiguration>,
        ): Promise<MediaKeySystemAccess>;
        requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>;
        sendBeacon(url: string | URL, data?: BodyInit | null): boolean;
        setAppBadge(contents?: number): Promise<void>;
        share(data?: ShareData): Promise<void>;
        vibrate(pattern: VibratePattern): boolean;
        vibrate(pattern: Iterable<number>): boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    appCodeName: string
    appName: string
    appVersion: string
    clipboard: Clipboard

    The clipboard read-only property of the Navigator interface returns a Clipboard object used to read and write the clipboard's contents. Available only in secure contexts.

    MDN Reference

    cookieEnabled: boolean

    The credentials read-only property of the Navigator interface returns the CredentialsContainer object associated with the current document, which exposes methods to request credentials. The CredentialsContainer interface also notifies the user agent when an interesting event occurs, such as a successful sign-in or sign-out. This interface can be used for feature detection. Available only in secure contexts.

    MDN Reference

    doNotTrack: string | null

    The Navigator.doNotTrack property returns the user's Do Not Track setting, which indicates whether the user is requesting websites and advertisers to not track them.

    geolocation: Geolocation

    The Navigator.geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device. This allows a website or app to offer customized results based on the user's location.

    MDN Reference

    gpu: GPU

    Available only in secure contexts.

    MDN Reference

    hardwareConcurrency: number
    language: string
    languages: readonly string[]

    The login read-only property of the Navigator interface provides access to the browser's NavigatorLogin object, which a federated identity provider (IdP) can use to set its login status when a user signs into or out of the IdP. Available only in secure contexts.

    MDN Reference

    maxTouchPoints: number

    The maxTouchPoints read-only property of the Navigator interface returns the maximum number of simultaneous touch contact points that are supported by the current device.

    MDN Reference

    mediaCapabilities: MediaCapabilities

    The mediaCapabilities read-only property of the Navigator interface references a MediaCapabilities object that can expose information about the decoding and encoding capabilities for a given media format and output capabilities.

    MDN Reference

    mediaDevices: MediaDevices

    The mediaDevices read-only property of the Navigator interface returns a MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing. Available only in secure contexts.

    MDN Reference

    mediaSession: MediaSession

    The mediaSession read-only property of the Navigator interface returns a MediaSession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.

    MDN Reference

    mimeTypes: MimeTypeArray
    onLine: boolean
    pdfViewerEnabled: boolean
    permissions: Permissions

    The permissions read-only property of the Navigator interface returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API.

    MDN Reference

    platform: string
    plugins: PluginArray
    product: string
    productSub: string
    serviceWorker: ServiceWorkerContainer

    The serviceWorker read-only property of the Navigator interface returns the ServiceWorkerContainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the ServiceWorker. Available only in secure contexts.

    MDN Reference

    userActivation: UserActivation

    The read-only userActivation property of the Navigator interface returns a UserActivation object which contains information about the current window's user activation state.

    MDN Reference

    userAgent: string
    vendor: string
    vendorSub: string
    wakeLock: WakeLock

    The wakeLock read-only property of the Navigator interface returns a WakeLock interface that allows a document to acquire a screen wake lock. While a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver.

    MDN Reference

    webdriver: boolean

    Methods

    • The canShare() method of the Navigator interface returns true if the equivalent call to navigator.share() would succeed. Available only in secure contexts.

      MDN Reference

      Parameters

      Returns boolean

    • The Navigator.getGamepads() method returns an array of Gamepad objects, one for each gamepad connected to the device.

      MDN Reference

      Returns (Gamepad | null)[]

    • The requestMediaKeySystemAccess() method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream. Available only in secure contexts.

      MDN Reference

      Parameters

      Returns Promise<MediaKeySystemAccess>

    • The requestMediaKeySystemAccess() method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream. Available only in secure contexts.

      MDN Reference

      Parameters

      Returns Promise<MediaKeySystemAccess>

    • The requestMIDIAccess() method of the Navigator interface returns a Promise representing a request for access to MIDI devices on a user's system. This method is part of the Web MIDI API, which provides a means for accessing, enumerating, and manipulating MIDI devices. Available only in secure contexts.

      MDN Reference

      Parameters

      Returns Promise<MIDIAccess>

    • The navigator.sendBeacon() method asynchronously sends an HTTP POST request containing a small amount of data to a web server.

      MDN Reference

      Parameters

      • url: string | URL
      • Optionaldata: BodyInit | null

      Returns boolean

    • Parameters

      • Optionalcontents: number

      Returns Promise<void>

    • The share() method of the Navigator interface invokes the native sharing mechanism of the device to share data such as text, URLs, or files. The available share targets depend on the device, but might include the clipboard, contacts and email applications, websites, Bluetooth, etc. Available only in secure contexts.

      MDN Reference

      Parameters

      Returns Promise<void>

    • The vibrate() method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists. If the device doesn't support vibration, this method has no effect. If a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead.

      MDN Reference

      Parameters

      Returns boolean

    • The vibrate() method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists. If the device doesn't support vibration, this method has no effect. If a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead.

      MDN Reference

      Parameters

      Returns boolean