W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: document.register and ES6

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 06 Feb 2013 10:46:38 +0000
Message-ID: <5112348E.4040208@mit.edu>
To: David Bruant <bruant.d@gmail.com>
CC: Erik Arvidsson <arv@chromium.org>, public-webapps <public-webapps@w3.org>, Dimitri Glazkov <dglazkov@google.com>, Daniel Buchner <daniel@mozilla.com>
On 2/6/13 10:36 AM, David Bruant wrote:
> As a band-aid short-term type of solution, the exposed function could be
> a proxy to the actual function with a specific construct trap

There is no "exposed function".  In Erik's proposal the function is 
provided by the script and then the script keeps using it; the caller is 
expected to mutate the [[Construct]] of that existing function object.

If I get to create my own objects and get the script to use them, I can 
create things with a custom [[Construct]] that act like functions, no 
problem.  It's taking an existing function object created via execution 
of a "function" statement and changing its [[Construct]] that's problematic.

Received on Wednesday, 6 February 2013 10:47:15 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:52 UTC