When a push message is received and the user is currently on a page for
your origin, the message is passed to the page and an onMessage event
is dispatched with the payload of the push message.
You should listen for token refreshes so your web app knows when FCM
has invalidated your existing token and you need to call getToken to get a new token.
To forcibly stop a registration token from being used, delete it by calling this method.
Calling this method will stop the periodic data transmission to the FCM backend.
Notification permissions are required to send a user push messages.
Calling this method displays the permission dialog to the user and resolves if the permission is granted.