oliver at apple.com
Fri Mar 18 10:45:45 PDT 2011
I think so -- my proposal doesn't take instances, nor produce instances, it takes the constructor function (Image is one of a handful of DOM constructor that can actually be used to construct things) and returns a new constructor that will produce an instances of the target object with a modified prototype chain.
On Mar 18, 2011, at 10:41 AM, Boris Zbarsky wrote:
> On 3/18/11 1:33 PM, Oliver Hunt wrote:
>> It also extends "trivially" to non-es objects, eg. Object.subclass(Image) or somesuch in the DOM, etc.
> Note that currently WebIDL calls for that to not work (in the sense that it examines the [[Class]] of DOM objects, so if you Object.create(new HTMLImageElement()) the thing you get won't have working DOM methods/properties on it).
> Or am I misunderstanding your proposal?
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss