Re: document.register and ES6

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.

-Boris

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