There were discussionsa about moving the API from navigator.push to serviceWorkerRegiatration.push. This would make a lot of sense to me given that the registration is tied to a service worker rather than a page.
Is this what you are planning to implement? It would be good to avoid shipping more than two versions of the API in release builds. / Jonas On Jul 21, 2014 9:23 AM, "Tyler Smith" <tylsm...@gmail.com> wrote: > > Summary: New Push API to replace the current specification for SimplePush. > Purposes include > 1) Switching to Promise, which was sorely needed. > 2) Establishing that the data field of messages is required. > 3) Establishing that all background communication happens over HTTPS > 4) Agreeing that the DOM API should not have to care what Push backend the > device is using > 5) Playing nicer with the interface exposure model (earlier we just > wouldn't show navigator.push to apps without permission) > 6) Supporting a feature set that at least one other implementer has agreed > upon, rather than what we just cooked up to support on fxos > > Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1038811 > > Link to Spec (informal disussion): > https://docs.google.com/document/d/1EeUDLsMLc1dtAk9uHVwnP1N8AFnH7vVVgec_h7BWlI4/edit?pli=1# > > Distilled Spec: > Promise<PushRegistration> register() => registration, or promise rejected > if fails > Promise<boolean> unregister() => true if successful, else false > Promise<DOMString> hasPermission() => "need-ask"/"granted"/"denied" (never > fails) > Promise<boolean> isRegistered() => true, false, or promise rejected if > unknown > > Platform Coverage: FXOS, Desktop FF, and Firefox Mobile > > Preference: dom.push.enabled > > We don't intend to break backwards compatibility with the old push system > in the immediate future. The navigator property for the new push API is > pushRegistrationManager, so the thinking right now is that for a few > releases the two will be offered side by side as completely distinct > services, but with the intent to remove the old push system at some point. > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform