Re: [DOM4] EventTarget as first class citizen

On Wed, Feb 29, 2012 at 7:21 PM, Jake Verbaten <raynos2@gmail.com> wrote:
>> For 1, I don't know what that would look like, but something like
>> ECMAScript's Object.create() would be a nice pattern:
>>
>> var et = EventTarget.create(someObject);
>
> We don't actually need that, we just need to glare at browser vendors until
> they implement the IDL. Once that is done then
>
> `var et = Object.create(EventTarget.prototype)`
>
> Should "just work" assuming the methods on EventTarget.prototype are generic
> and flexible enough to work on any object.

I don't see how they could be. Where would the functions store the
internal state such as the set of event listeners for example?

/ Jonas

Received on Wednesday, 29 February 2012 19:41:48 UTC