{"action":"opened","issue":{"url":"https://api.github.com/repos/whatwg/fetch/issues/263","repository_url":"https://api.github.com/repos/whatwg/fetch","labels_url":"https://api.github.com/repos/whatwg/fetch/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/263/comments","events_url":"https://api.github.com/repos/whatwg/fetch/issues/263/events","html_url":"https://github.com/whatwg/fetch/issues/263","id":143211123,"number":263,"title":"Tight coupling between JS engine and browser engine","user":{"login":"KiChjang","id":3248587,"avatar_url":"https://avatars.githubusercontent.com/u/3248587?v=3","gravatar_id":"","url":"https://api.github.com/users/KiChjang","html_url":"https://github.com/KiChjang","followers_url":"https://api.github.com/users/KiChjang/followers","following_url":"https://api.github.com/users/KiChjang/following{/other_user}","gists_url":"https://api.github.com/users/KiChjang/gists{/gist_id}","starred_url":"https://api.github.com/users/KiChjang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KiChjang/subscriptions","organizations_url":"https://api.github.com/users/KiChjang/orgs","repos_url":"https://api.github.com/users/KiChjang/repos","events_url":"https://api.github.com/users/KiChjang/events{/privacy}","received_events_url":"https://api.github.com/users/KiChjang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-24T10:33:39Z","updated_at":"2016-03-24T10:33:39Z","closed_at":null,"body":"As it stands right now, the [Fetch spec](https://fetch.spec.whatwg.org) specifies that the [bodies](https://fetch.spec.whatwg.org) of both the [Request](https://fetch.spec.whatwg.org/#concept-request) and [Response](https://fetch.spec.whatwg.org#concept-response) to have a [ReadableStream](https://fetch.spec.whatwg.org/#concept-readablestream) object associated with it, which, if my spec reading is correct, is a JavaScript engine object, due to the existence of [internal slots](https://streams.spec.whatwg.org/#rs-internal-slots).\r\n\r\nThis overlaps the responsibilities of the JS engine and the browser engine - the JS engine depends on the browser engine to implement the Fetch spec, and the browser engine depends on the JS engine to implement the concept of a ReadableStream. I believe the ideal case would be to make it so that the fetch implementation is completely self-contained, i.e. only the browser engine should need to bear responsibility in handling network fetches."}}