Skip to content

Instantly share code, notes, and snippets.

@williampsena
Last active March 28, 2016 01:42
Show Gist options
  • Save williampsena/4f06c43e38dd01c59a1d to your computer and use it in GitHub Desktop.
Save williampsena/4f06c43e38dd01c59a1d to your computer and use it in GitHub Desktop.
function RequestPermission(callback){
callback = callback || function(status) {
console.log('Status da permissão: ' + status);
callback(status === "granted");
};
Notification.requestPermission(callback);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment