Re: [heycam/webidl] Throw when not calling interfaces as constructors (#205)

tobie commented on this pull request.



>  
 <ol class="algorithm">
     1.  If |I| was not declared with a [{{Constructor}}]
         [=extended attribute=], then
         <a lt="es throw">throw a <emu-val>TypeError</emu-val></a>.
+    1.  If |newTarget| is <emu-val>undefined</emu-val>, then

In https://github.com/tc39/ecma262/issues/529#issuecomment-207459518, @allenwb writes: 

>  "NewTarget" and "this value" should only be used in the top-level algorithms that defined built-ins. They should not be used in other abstract operations (because paragraph 3 of 9.3 doesn't generally apply to abstract operations). If an abstract operation that is used to factor the definition of one or more built-ins need to access those values they should be explicitly passed as parameters to the abstract operation (for example see https://tc39.github.io/ecma262/#sec-regexpalloc).

Aren't we in the case described by that last sentence, here?



-- 
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/205

Received on Thursday, 3 November 2016 12:52:56 UTC