[heycam/webidl] Clarify [[Call]] + [[Construct]] for named (and possibly non-named) constructors (#278)

We should state that named constructors are [built-in function objects](https://tc39.github.io/ecma262/#sec-built-in-function-objects) whose behavior (both [[Call]] and [[Construct]] is specified as the steps currently given. That is, we need to trigger the clause in the definition of built-in function objects that says

> The behaviour specified for each built-in function via algorithm steps or other means is the specification of the function body behaviour for both [[Call]] and [[Construct]] invocations of the function. 

The spec currently says "When evaluating the function object F" for non-[NamedConstructor] interface objects, which is a reasonable way of specifying that behavior.

Additionally the ES spec says

> Built-in function objects that are not identified as constructors do not implement the [[Construct]] internal method unless otherwise specified in the description of a particular function.

So we should be sure to say that they are constructors. Maybe it's better to just be explicit and say that the steps are for both [[Construct]] and [[Call]] in both cases.

-- 
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/issues/278

Received on Monday, 23 January 2017 16:32:18 UTC