Notification events
suggest changeThe Notification API specifications support 2 events that can be fired by a Notification.
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 click me and this is my event object: ", event);
}
The error
event
The notification will fire this event whenever something wrong will happen, like being unable to display
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