@nextcloud/dialogs
    Preparing search index...

    Interface WakeLockSentinel

    The WakeLockSentinel interface of the Screen Wake Lock API can be used to monitor the status of the platform screen wake lock, and manually release the lock when needed. Available only in secure contexts.

    MDN Reference

    interface WakeLockSentinel {
        onrelease: ((this: WakeLockSentinel, ev: Event) => any) | null;
        released: boolean;
        type: "screen";
        addEventListener<K extends "release">(
            type: K,
            listener: (this: WakeLockSentinel, ev: WakeLockSentinelEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        release(): Promise<void>;
        removeEventListener<K extends "release">(
            type: K,
            listener: (this: WakeLockSentinel, ev: WakeLockSentinelEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index
    onrelease: ((this: WakeLockSentinel, ev: Event) => any) | null
    released: boolean

    The released read-only property of the WakeLockSentinel interface returns a boolean that indicates whether a WakeLockSentinel has been released.

    MDN Reference

    type: "screen"

    The type read-only property of the WakeLockSentinel interface returns a string representation of the currently acquired WakeLockSentinel type.

    MDN Reference

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      Returns boolean

    • The release() method of the WakeLockSentinel interface releases the WakeLockSentinel, returning a Promise that is resolved once the sentinel has been successfully released.

      MDN Reference

      Returns Promise<void>