On Wed, Feb 6, 2013 at 10:01 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 2/6/13 5:07 PM, Erik Arvidsson wrote: > >> This refactoring is needed for ES6 anyway so it might be worth looking >> into no matter what. >> > > Well, yes, but it's a matter of timeframes. It's incredibly unlikely that > a complete refactoring of how functions are implemented (which is what I > was given to understand would be required here) could be done in the next > several months to a year.... I doubt we want to wait that long to do > document.register. This is a valid and important concern. Boris, in your opinion, what is the most compatible way to proceed here? I see a couple of options, but don't know how difficult they will be implementation-wise: 1) Expose the ability to override [[Construct]]. Arv tells me that he spoke with V8 peeps and they think they can do this fairly easily. How's the SpiderMonkey story looking here? 2) Until ES6 is here, return a generated constructor from document.register, which is the approach that Scott/Arv/Daniel came up with for polyfills. Effectively, this generated constructor will serve as the surrogate [[Construct]] override. 3) ... 4) PROFIT :DG<