Skip to content

Instantly share code, notes, and snippets.

@balajek
Created April 5, 2018 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balajek/5dc3062eedd3f5c9629c4dbc948d1906 to your computer and use it in GitHub Desktop.
Save balajek/5dc3062eedd3f5c9629c4dbc948d1906 to your computer and use it in GitHub Desktop.
Event raised when notification permission is changed by user
browser.notifications.onPermissionLevelChanged.addListener(function (level) {
window.alert("Notification permission " + ((String(level) == "granted") ? "granted" : "denied"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment