pub fn request_notification_permission()Expand description
Asks for permission to show notifications now, rather than on the first one posted.
For a settings screen with a switch that says “notify me when a session finishes”:
asking at the moment the user turns it on is asking when the user knows what for. The
answer arrives through notification_permission and the readers registered with
subscribe_permission.
A browser only lets a page ask from inside something the user did. Called from the handler of that press, the request rides out in the batch the press produced and is applied on the same call stack, so it is still inside it.