Created
June 28, 2019 10:43
-
-
Save indreklasn/71395d3b85c963886e8bf7067578e305 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notification.requestPermission(result => { | |
if (result === 'granted') { | |
navigator.serviceWorker.ready.then(registration => { | |
registration.showNotification('Vibration Sample', { | |
body: 'Buzz! Buzz!', | |
tag: 'vibration-sample' | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment