The fetch() function is available on ServiceWorkerGlobalScope, and asks the UA to make a HTTP request on the ServiceWorker's behalf according to the Fetch specification. Filing in Necko since most of the work will be exposing Fetch spec semantics via existing HTTP infrastructure. Relevant specs: Fetch: http://fetch.spec.whatwg.org/ ServiceWorker: http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
> Filing in Necko since most of the work will be exposing Fetch spec > semantics via existing HTTP infrastructure. This looks more like an XHR-like thing to me (i.e. a bunch of wrapper code around HTTP channels, that doesn't necessarily live in /netwerk). Jonas, do you have an idea where this code should live?
Component: Networking: HTTP → DOM: Workers
The code should probably live in contant/base/src or dom/base. FWIW I would expect that the implementation would look significantly different from the XHR code since most of the XHR code is back-compat cruft and event handling code, neither of which is needed for the fetch() API.
Assignee: nobody → gene.lian
Depends on: 1023520
Taking for now since I have some patches.
Assignee: nobody → nsm.nikhil
Depends on: 767924
Attachment #8444530 - Attachment is obsolete: true
Depends on: dom-fetch-api
Closing as dom-fetch-api deals with all of this.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.