Skip to content

Instantly share code, notes, and snippets.

@st98
Created December 1, 2015 03:51
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 st98/d7eeeb57b957a583458e to your computer and use it in GitHub Desktop.
Save st98/d7eeeb57b957a583458e to your computer and use it in GitHub Desktop.
Notification.requestPermission(function callback(res) {
if (res === 'denied' || res === 'default') {
console.error('ア');
return;
}
window.setTimeout(function () {
new Notification('title', {body: 'body'});
}, 3000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment