- From: Ms2ger <notifications@github.com>
- Date: Fri, 08 Feb 2019 01:37:55 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/635/review/201493661@github.com>
Ms2ger commented on this pull request. > @@ -12349,12 +12363,60 @@ It is the responsibility of specifications using Web IDL to state which global environment (or, by proxy, which global object) each platform object is associated with. +<div algorithm> + To <dfn export lt="new|create|create a new|create an object implementing|create an object + implementing the interface">create an object implementing the interface</dfn> |interface| in the + Realm |realm|, with optional `new.target` value |newTarget|, perform the following steps: + + 1. Assert: |interface| is [=exposed=] in |realm|. + 1. Let prototype be the [=interface prototype object=] for |interface| in + |realm|. + 1. If |newTarget| is provided, then: + 1. Issue: If we just pass {{NewTarget}} through in a constructor, would this not + always be defined (sometimes to the [=interface object=] itself)? That would have some extremely surprising effects if interpreted to the letter. Consider the [`Response` constructor](https://fetch.spec.whatwg.org/#dom-response): 3. Let _r_ be a new `Response` object associated with a new response. 4. Set _r_’s headers to a new `Headers` object, whose header list is _r_’s response’s header list, and guard is "response". If you just pull the NewTarget from the air, it would be used for both the `Response` and `Headers` objects. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/635#discussion_r255005786
Received on Friday, 8 February 2019 09:38:17 UTC