This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24080 (fetch) - Integrate with Fetch specification
Summary: Integrate with Fetch specification
Status: RESOLVED MOVED
Alias: fetch
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: blocked on dependencies
Keywords:
Depends on: 26836
Blocks: 24031 24137 24613 24659 26830
  Show dependency treegraph
 
Reported: 2013-12-12 21:24 UTC by Ian 'Hixie' Hickson
Modified: 2015-09-16 11:54 UTC (History)
6 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-12-12 21:24:23 UTC

    
Comment 1 Anne 2013-12-13 14:34:38 UTC
Please consider "HTML fetch" obsolete when you do this. Please first review and request appropriate hooks. The current setup is very barebones and requires setting up requests to pass to fetch and handling responses that are returned. I'm fine with adding sugar, but I have not yet figured out exactly what that should be myself.
Comment 2 Anne 2014-02-10 14:56:08 UTC
So in bug 24137 comment 19 you say we need to pick the right event loop. This would be a "networking task source" associated with a set of browsing contexts or a worker. So should you pass in either a Document or a WorkerGlobalScope as a handle for Fetch to find the relevant things?
Comment 3 Ian 'Hixie' Hickson 2014-05-07 23:07:13 UTC
Ideally I'd pass in an event loop, no? I'm not really sure.

How confident are you in the current fetch spec text?

What exactly is it I should be merging in? In bug 24613 you said something about one of the algorithms being something you want back into HTML?
Comment 4 Anne 2014-05-08 14:28:41 UTC
The problem I have is that everyone uses Fetch, but nobody really cares about the details and overall platform coherence. So it's really hard to figure out what parameters Fetch needs and what the easiest setup could be given the various requirements we have.

E.g. for service workers we need a global. We can use that global for CSP too. Can we use it for Referer determination (also partially a CSP matter these days)? We always need an origin, does that need to be passed in explicitly, or can we get that from a global too?

Most of the structure is sound I think, but the details are not cemented.
Comment 5 Anne 2014-05-08 14:30:14 UTC
Once HTML uses this, it should use the http://fetch.spec.whatwg.org/#concept-fetch algorithm almost directly, perhaps with shorthands defined for more complicated fetching scenarios, such as "image fetch".
Comment 6 Ian 'Hixie' Hickson 2014-07-31 21:14:28 UTC
(Currently discussing Fetch's use of 'client' in webappsec.)
Comment 7 Ian 'Hixie' Hickson 2014-09-08 23:34:18 UTC
Why do you need a global for service workers?
Comment 8 Anne 2014-09-09 09:11:38 UTC
Currently we check if the client (environment / global object) is from a service worker to go directly to the network. (We also use that client for referrer, origin, etc.)
Comment 9 Ian 'Hixie' Hickson 2014-09-09 15:57:34 UTC
Maybe we should extend the script settings object to just me an "environment settings object", and shunt that around. That would let us maintain specific referrers, origins, event loops, etc, things that aren't always set with a global or Realm. There's a global hung off the side of the settings object already.
Comment 10 Anne 2014-09-09 16:06:10 UTC
An environment settings object would work for me. That would indeed help with queuing tasks on the right event loop as well.