Description
Let requestObject be the result of invoking the initial value of Request as constructor with input and init as arguments. If this throws an exception, reject p with it and return p
Which realm does the Request constructor come from?
I think we want it to be the relevant realm of this WindowOrWorkerGlobalScope object. That seems most in line with our plan in whatwg/webidl#135, although that is about slightly different phrasing ("a new Response" vs. this line's "invoking the initial value of Request as constructor").
BTW, editorial issues with this sentence:
- "as constructor" -> "as a constructor"
- Missing period
- "Request" links to the class, but should probably link to the constructor.
Found by @benjamingr and @TimothyGu in IRC: https://freenode.logbot.info/whatwg/20180712#c1621394
(BTW, @TimothyGu found another good thing to test: what if you create a Request from another window, and pass it to fetch()? What client does it use? Some inspection of Chrome's source code reveals it may not be using the other window, but that's what the spec says should happen.)