diff --git a/web-push.md b/web-push.md index 041f749c..c0eb2530 100644 --- a/web-push.md +++ b/web-push.md @@ -225,6 +225,16 @@ export function toUint8Array(base64String: string, atobFn: typeof atob): Uint8Ar The options object is of type `PushSubscriptionOptions`, which includes the `userVisibleOnly` and `applicationServerKey` (ie VAPID public key) properties. + options: An object that contains the options used for creating the + subscription. This object itself has the following sub-properties: + + applicationServerKey: A public key your push service uses for application + server identification. This is normally a Uint8Array. + + userVisibleOnly: A boolean value indicating that the push messages that + are sent should be made visible to the user through a notification. + This is often set to true. + The subscribe() method returns a `Promise` that resolves to a `PushSubscription` object containing details of the subscription, such as the endpoint URL and the public key. The returned data would have a form like this: @@ -246,16 +256,6 @@ public key. The returned data would have a form like this: representing the subscription's expiration time in milliseconds since 01 January, 1970 UTC. This can be null if the subscription never expires. - options: An object that contains the options used for creating the - subscription. This object itself has the following sub-properties: - - applicationServerKey: A public key your push service uses for application - server identification. This is normally a Uint8Array. - - userVisibleOnly: A boolean value indicating that the push messages that - are sent should be made visible to the user through a notification. - This is often set to true. - The BROWSER will, internally, then use that URL to check for incoming messages by way of the service worker we described earlier. The BROWSER also sends this URL back to SERVICE which will use that URL to send messages to the BROWSER via