You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Web developers using the Push API, and subscribing from a document context, will typically check !!window.Notification to see whether the Notifications API is implemented, since they cannot easily check from a document context whether the Notifications Service Worker API (especially ServiceWorkerRegistration.showNotification and ServiceWorkerGlobalScope.onnotificationclick) is implemented.
Thus the spec should recommend that UAs which implement the Push API either:
a) do not implement the Notifications API at all; or
b) implement and ship Notifications Service Worker API before or together with shipping the Push API.
The text was updated successfully, but these errors were encountered:
The Push API does not have a dependency on the Notification API. I don't think this makes sense unless we decide to add such a dependency, e.g. implement an option bag for subscribe()/hasPermission(), which is a larger issue.
On a tangent, ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') works on both documents and workers.
Web developers using the Push API, and subscribing from a document context, will typically check
!!window.Notification
to see whether the Notifications API is implemented, since they cannot easily check from a document context whether the Notifications Service Worker API (especiallyServiceWorkerRegistration.showNotification
andServiceWorkerGlobalScope.onnotificationclick
) is implemented.Thus the spec should recommend that UAs which implement the Push API either:
a) do not implement the Notifications API at all; or
b) implement and ship Notifications Service Worker API before or together with shipping the Push API.
The text was updated successfully, but these errors were encountered: