Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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