getAll
The add method is used to retrieve a list of pending alarms.
#
Syntax#
Propertiesdate
- A Date object representing the time the alarm must be fired.respectTimezone
- A string that indicates if the alarm must be fired respecting the timezone set with the date. Possible values areignoreTimezone
orhonorTimezone
.data
(Optional) - An arbitrary JavaScript object with data to be stored with the alarm.
#
ReturnA DOMRequest object to handle the success or failure of the method call.
If the method call is successfull, the request's result will be a number representing the id of the alarm.
#
ExampleNote: You need to use the same URL for setting and receiving an alarm. For example, If you invoke
navigator.mozAlarms.add()
onfoo.html
orindex.html?foo=bar
, but have{ "alarm": "/index.html" }
in your manifest messages field, you'll never receive the alarm.