whatwg / fetch

Fetch Standard
https://fetch.spec.whatwg.org/
Other
2.11k stars 329 forks source link

Request.clone/Response.clone do not specify in which global the new object belongs to. #825

Open bakulf opened 5 years ago

bakulf commented 5 years ago

In which global should be created the new request? Same question for a cloned Response object. Currently, in Firefox we use the global of the original request/response object.

jakearchibald commented 5 years ago

Good catch. I agree with what Firefox is doing.

annevk commented 5 years ago

Yeah me too, that way any prototype expandos also remain available etc. I'll see about testing this at least. I think the behavior would fall out of fixing https://github.com/heycam/webidl/issues/135 in IDL.

annevk commented 5 years ago

I created https://github.com/web-platform-tests/wpt/pull/13850 to test this. As far as I can tell all browsers agree here.