Remove ServiceWorkerGlobalScope#fetch |
||||||||||
Issue descriptionIt seems like this fetch is not in the spec, and onfetch is handling HTTP fetch (the fetch event is defined here https://w3c.github.io/ServiceWorker/#fetchevent-interface). Should we remove this fetch API in ServiceWorkerGlobalScope? Or should we add it to the spec?
,
Feb 28 2017
,
Feb 28 2017
But WorkerGlobalScope doesn't have fetch, even though WindowOrWorkerGlobalScope does. It doesn't seem like there's a link between the two of them. Should WorkerGlobalScope inherits from WindowOrWorkerGlobalScope? Also, we need to include the spec links to fetch in ServiceWorkerGlobalScope.idl
,
Feb 28 2017
Never mind, I didn't see Window implements WindowOrWorkerGlobalScope; WorkerGlobalScope implements WindowOrWorkerGlobalScope; in the spec. But shouldn't we be moving fetch from ServiceWorkerGlobalScope to WorkerGlobalScope or even higher?
,
Feb 28 2017
WorkerFetch (implemented as GlobalFetch) defines fetch on partial interface WorkerGlobalScope (and the ServiceWorkerGlobalScope fetch override just calls the GlobalFetch version anyway, so removing that should have no effect afaict).
,
Mar 9 2017
,
Mar 17 2017
,
Mar 21 2017
I have confirmed it is defined in Blink here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl But is the difference actually visible to user code?
,
Mar 21 2017
These two partial interfaces together should be identical to what the spec says, and could probably be refactored into a "partial interface WindowOrWorkerGlobalScope" if one was so inclined: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/fetch/WindowFetch.idl https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl The override in ServiceWorkerGlobalScope is in addition to what's required to exist in the spec, and may be observable to scripts. The ServiceWorkerGlobalScope interface looks like it's exposed, and maybe ServiceWorkerGlobalScope.prototype.hasOwnProperty('fetch') returns true when it shouldn't?
,
Mar 23 2017
I'm interested in this issue. Work items: 1) Add WindowOrWorkerGlobalScope.idl into core/frames, and move the common attrs/functions between Window.idl and WorkerGlobalScope.idl into WindowOrWorkerGlobalScope.idl (e.g., 'origin' attr) 2) Implement "partial interface WindowOrWorkerGlobalScope" under modules/fetch and remove WindowFetch.idl and WorkerFetch.idl. 3) Remove fetch() from ServiceWorkerGlobalScope.idl.
,
Apr 6 2017
WindowOrWorkerGlobalScope.idl will be added by https://codereview.chromium.org/2798433003/
,
Apr 6 2017
I meant to forward this issue to a 20% contributor but she is now busy with other issues, so let me return this to the shelf for now...
,
Apr 6 2017
,
Mar 3 2018
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by bke...@mozilla.com
, Feb 28 2017