On Jul 12, 2014 2:11 AM, "Jake Archibald" wrote:
>
> On 11 July 2014 17:59, Jonas Sicking wrote:
>>
>> On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald
wrote:
>> > navigator.serviceWorker.ready.then(function(reg) {
>> > reg.push.register(...)
>> > });
>>
>> I agree this looks good. Though maybe
On 11 July 2014 17:59, Jonas Sicking wrote:
> On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald
> wrote:
> > navigator.serviceWorker.ready.then(function(reg) {
> > reg.push.register(...)
> > });
>
> I agree this looks good. Though maybe
>
> reg.registerPush(...)
>
> instead?
>
.push also has .u
On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald wrote:
> navigator.serviceWorker.ready.then(function(reg) {
> reg.push.register(...)
> });
I agree this looks good. Though maybe
reg.registerPush(...)
instead?
/ Jonas
Yes, moving push (especially register, unregister and isRegistered) onto
ServiceWorkerRegistration instances would make the API a lot easier to use.
Currently it's order dependent, and if a developer tries to register before
they have registered a Service Worker, navigator.push.register will rejec
Currently serviceworker-dependent APIs are sitting in navigator.whatever,
but now we're adding a ServiceWorkerRegistration object (
https://github.com/slightlyoff/ServiceWorker/issues/365#issue-3745) it
feels like they should live there.
So instead of:
navigator.serviceWorker.ready.then(funct