Notification events
suggest changeA Notification can fire click, show, close, and error. show fires when the notification is displayed, and close fires when it is dismissed.
The click event.
This event will run when you click on the notification body (excluding the closing X and the Notifications configuration button).
Example:
notification.onclick = function(event) {
console.debug("you clicked me and this is my event object: ", event);
}
The error event
The notification fires this event when something goes wrong, for example when it cannot be displayed:
notification.onerror = function(event) {
console.debug("There was an error: ", event);
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents