Skip to content

Instantly share code, notes, and snippets.

@xemasiv
Created May 3, 2018 00:14
Show Gist options
  • Save xemasiv/9870a1895ecc938ab9ed1aef5f60d407 to your computer and use it in GitHub Desktop.
Save xemasiv/9870a1895ecc938ab9ed1aef5f60d407 to your computer and use it in GitHub Desktop.
Notifications
var n = new Notification('Connected', { body: 'Well done mate'} );
setTimeout(() => n.close(), 3000);
Notification.permission;
Notification.requestPermission().then(console.log).catch(console.error);
// https://developer.mozilla.org/en-US/docs/Web/API/notification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment