Notification events

suggest change

A 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);
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents