kaios-types
    Preparing search index...

    Interface AlarmsManager

    Alarm API

    mozAlarms

    @mozilla.org/alarmsManager;1

    alarms

    dom.mozAlarms.enabled Provides access to the device's alarm scheduling.

    interface AlarmsManager {
        add(
            date: number | Date,
            respectTimezone: "ignoreTimezone" | "honorTimezone",
            data?: any,
        ): DOMRequest;
        getAll(): DOMRequest;
        remove(id: number): void;
    }
    Index

    Methods

    Methods

    • Schedules a new alarm.

      Parameters

      • date: number | Date

        The time at which the alarm should trigger.

      • respectTimezone: "ignoreTimezone" | "honorTimezone"

        Whether to respect the timezone.

      • Optionaldata: any

        Arbitrary data to be stored with the alarm.

      Returns DOMRequest

    • Cancels a scheduled alarm.

      Parameters

      • id: number

        The ID of the alarm to remove.

      Returns void