Re: [w3c/ServiceWorker] clarify that manually constructed ExtendableEvent objects may not extend lifetime via waitUntil() (#1040)

To put this in context, I do, to emulate background sync on Firefox, periodically check if ```navigator.onLine``` is ```true```, and when it is I fire an extendable event:
```
let e = new ExtendableEvent('sync');
e.tag = 'some_tag';
if (navigator.onLine)
    self.dispatchEvent(e);
```
My event handler looks like:
```
self.addEventListener('sync', (evt) => {
    if (evt.tag == 'some_tag') {
        evt.waitUntil(doStuff());
    }
});
```
where ```evt.waitUntil``` is taken from some Background sync tutorial. I understand it would not have any effect with my emulated background sync, but will it with the real background sync? Is that specified anywhere?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1040#issuecomment-268995335

Received on Friday, 23 December 2016 14:11:30 UTC