Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Fixing typo in Notification Request Permission snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
zateutsch authored Jun 22, 2022
1 parent 012b88a commit 32eb87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snippets/pwa-windows.js.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"body": [
"// Requesting permission should only be done in response to a user action. This is a best practice, to avoid interrupting the user with permission prompts when the user hasn't yet interacted with a feature that uses notifications.",
"${1:button}.addEventListener(\"${2:click}\", () => {",
"\tNotifications.requestPermission().then(permission => {",
"\tNotification.requestPermission().then(permission => {",
"\t\tif (permission === \"granted\") {",
"\t\t\t${0:console.log(\"The user accepted\")};",
"\t\t}",
Expand Down Expand Up @@ -107,4 +107,4 @@
"}"
],
}
}
}

0 comments on commit 32eb87d

Please sign in to comment.