Confirmed users
110
edits
m (→Proposed API) |
(Add moz prefix for the usages of system messages APIs.) |
||
Line 77: | Line 77: | ||
* How to listen to the alarm-fired message with a callback function (executed when the alarm goes off)? | * How to listen to the alarm-fired message with a callback function (executed when the alarm goes off)? | ||
navigator. | navigator.mozSetMessageHandler("alarm", function (message) { alert("alarm fired: " + JSON.stringify(message)); }); | ||
* How to know in advance if there exists any pending alarm-fired messages? | * How to know in advance if there exists any pending alarm-fired messages? | ||
navigator. | navigator.mozHasPendingMessage("alarm"); | ||
== FAQ == | == FAQ == |