← Back to release summary

PushSubscription.options

Category
Realtime / Communication
Type
New or changed feature
Status
Enabled by default (Chrome 54)
Intent stage
None

Summary

An "options" attribute is added to PushSubscription objects that the PushManager.subscribe(...) and getSubscription() promises resolve to. It reflects the options passed in when subscribing. This allows web developers to see what applicationServerKey each PushSubscription is associated with, and hence what key their server will need to present when sending messages. Previously web developers with more than one applicationServerKey had to keep track of this separately (e.g. in IndexedDB).

Standards & signals

Docs: https://developers.google.com/web/updates/2016/09/options-of-a-pushsubscription

View on chromestatus.com