Notification.permission defaults to "granted" when it should be "default"
floatzeI opened this issue · comments
Bug description
Notification.permission
(mdn) defaults to "granted", when all other browsers default to the string "default". It should only be "granted" once someone explicitly approves the notification permission for a website.
It's (probably) worth noting that this doesn't affect the actual permission - visiting a site and trying to send a notification to a user will still create the prompt asking the user to approve/decline notifications.
This can lead to a weird user experience if a website reads the Notification.permission
value and only creates a notification if they've been granted permission. Trying to create a notification without permission will create a box asking the user to accept/decline the notification permission, which may not be what a website wants to happen.
To Reproduce
- Visit a webpage you haven't granted notification permissions to, such as https://en.wikipedia.org/wiki/Dog
- Open up inspect element (Right Click => Inspect)
- Open up the javascript console if it isn't already open
- Paste this into the console:
console.log(Notification.permission)
- You should see the string "granted" printed out in the console
Expected behavior
At step 5 of the above reproduction example, the string "default" should be printed
Screenshots
N/A
Details:
- Operating System: Windows 10 64-Bit
- Wexond version: 5.2.0
- Last known working Wexond version:
Additional context
I've only been testing this in a regular website, so I don't know if the issue exists in web workers.