On Mon, Jun 2, 2014 at 6:59 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Thu, May 29, 2014 at 4:25 PM, Takeshi Yoshino <tyoshino@google.com>
> wrote:
> > http://fetch.spec.whatwg.org/#dom-request
> > Add steps to set client and context?
>
> That happens as part of the "restricted copy". However, that might
> still change around a bit.
Ah, ok.
> > http://fetch.spec.whatwg.org/#cors-preflight-fetch-0
> > Add steps to set client and context?
>
> That's an internal algorithm never directly used. You can only get
> there from http://fetch.spec.whatwg.org/#concept-fetch and that can
> only be reached through an API such as fetch().
Right. But preflight's client and context are not initialized before
invoking HTTP fetch (http://fetch.spec.whatwg.org/#concept-http-fetch).
client is referred in HTTP fetch.
BTW, "handle a fetch" is a dead link.
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/handle-a-fetch
> > The promise is rejected with a TypeError which seems inconsistent with
> XHR.
> > Is this intentional?
>
> Yes. I wanted to stick to JavaScript exceptions. However, I suspect at
> some point once we have FormData integration and such there might be
> quite a bit of dependencies on DOM in general, so maybe that is moot.
>
Got it. Thanks.