November 2011
Intermediate to advanced
384 pages
13h 23m
English
You can define custom JavaScript callback functions at specific events to be executed as the Desktop Notifications API interacts with the user. There are four events in the Notification interface for which you can listen:
notifyMessage.ondisplay = function() { ... }; notifyMessage.onclick = function() { ... }; notifyMessage.onclose = function() { ... }; notifyMessage.onerror = function() { ... };
The ondisplay event is called whenever the notification message is actually displayed on the desktop after calling show() . This will allow you to know if a delay occurred caused by too many messages on-screen.
The onclick event is called whenever the user clicks the message itself. It is a good idea to call ...
Read now
Unlock full access