Closed Bug 1214772 Opened 8 years ago Closed 8 years ago
Until() on Fetch Event
FetchEvent now extends ExtendableEvent which gives it a waitUntil() method: https://github.com/slightlyoff/ServiceWorker/commit/ff93a4630866dcb9080bdf83fa5b82ddfed593a1
Chrome actually implements this already and I see sites needing it all over the place. I think we need it for v1 because devs are not going to try to feature detect this.
Attachment #8679063 - Flags: review?(bkelly) → review+
Please also remove mPromise and GetPromise from FetchEvent, these were used to extend the sw's lifetime when calling respondWith. I think respondWith should call waitUntil internally.
(In reply to Cătălin Badea (:catalinb) from comment #4) > Please also remove mPromise and GetPromise from FetchEvent, these were used > to extend the sw's lifetime when calling respondWith. I think respondWith > should call waitUntil internally. Good point! Filed bug 1218621.
Comment on attachment 8678844 [details] [diff] [review] Make FetchEvent inherit from ExtendableEvent r=me
Attachment #8678844 - Flags: review?(bzbarsky) → review+
The FetchEvent page already states that it inherits from ExtendableEvent, but I've added an explicit link to the waitUntil() page, just to be clear: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent And a note was already added to the release notes: https://developer.mozilla.org/en-US/Firefox/Releases/44#Service_Workers So we're all good.
You need to log in before you can comment on or make changes to this bug.