Created
May 30, 2019 11:17
-
-
Save ranwahle/eb40d85fb80bbff641d2f69f8fc0014a to your computer and use it in GitHub Desktop.
Requesting a permission
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
| async function pleaseLetMeNotify() { | |
| return await navigator.permissions.request({name: 'notifications'}); | |
| } | |
| // Retuns a promise of a PermissionStatusObject |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment