Confirmed users
110
edits
m (→Features) |
m (→Examples) |
||
Line 78: | Line 78: | ||
navigator.mozAlarms.remove(alarmId2); | navigator.mozAlarms.remove(alarmId2); | ||
* How to listen to the <code>"alarm"</code> message and handle it with a callback function when | * How to listen to the <code>"alarm"</code> message and handle it with a callback function when the alarm goes off? | ||
navigator.mozSetMessageHandler("alarm", function (message) { alert("alarm fired: " + JSON.stringify(message)); }); | navigator.mozSetMessageHandler("alarm", function (message) { alert("alarm fired: " + JSON.stringify(message)); }); |