W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: Would it make sense for Web IDL [[Call]] to do the current execution context munging that ES6 functions' default [[Call]] does?

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Thu, 28 Aug 2014 12:06:42 -0700
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-Id: <33C3EB37-C30D-4595-A7A6-AEF5FC9E3E5C@wirfs-brock.com>
To: Boris Zbarsky <bzbarsky@mit.edu>

On Aug 28, 2014, at 11:31 AM, Boris Zbarsky wrote:

> On 8/28/14, 2:22 PM, Allen Wirfs-Brock wrote:
>>> I say mostly, because there _are_ some cases where Web IDL defines its own [[Call]].  Specifically, for constructors and legacycallers.  Is there a way those [[Call]] definitions could just have the steps of #sec-built-in-function-objects-call-thisargument-argumentslist performed without copy/pasting them?
>> 
>> That's fine.  You should be able to do whatever you need as part of the step 7 or 9 extension points.
> 
> Not quite, because at least the legacycaller case is not a Function object at all.  So it really does need to define a [[Call]] in its entirety.

Well, ES basically considers anything with a [[Call]] internal method to be a function object of one sort or another.  There really aren't any requirements or invariants imposed upon [[Call]].  The built-in function [[Call]] sets up the invariants that ensure that the "body" of the function can interact with the rest of the ES spec (including making callbacks into ES code).  


Allen
Received on Thursday, 28 August 2014 19:07:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC