Back to Content

alarms.Alarm

files/en-us/mozilla/add-ons/webextensions/api/alarms/alarm/index.md

latest944 B
Original Source

Information about a single alarm. This object is returned from {{WebExtAPIRef('alarms.get()')}} and {{WebExtAPIRef('alarms.getAll()')}}, and is passed into the {{WebExtAPIRef('alarms.onAlarm')}} listener.

Type

Values of this type are objects. They contain the following properties:

  • name
    • : string. Name of this alarm. This is the name that was passed into the {{WebExtAPIRef('alarms.create()')}} call that created this alarm.
  • scheduledTime
  • periodInMinutes {{optional_inline}}
    • : double. If this is not null, then the alarm is periodic, and this represents its period in minutes.

{{WebExtExamples}}

Browser compatibility

{{Compat}}

[!NOTE] This API is based on Chromium's chrome.alarms API.