Re: [DOM4] EventTarget as first class citizen

On Mon, 27 Feb 2012 15:18:55 +0100, Marcos Caceres <w3c@marcosc.com> wrote:
> On Thursday, February 23, 2012 at 3:18 PM, Jonas Sicking wrote:
>> I think the way we should do this is to enable instantiating
>> EventTarget objects using an EventTarget ctor. This won't give you a
>> neato extension syntax, but I think we'll have to rely on ES.next for
>> that. Before ecma-script has a better solution you can always
>> monkeypatch the object.
>>
>> So something like:
>> a = new EventTarget();
>> b = new EventTarget(a); // a is the parent in the target chain
>>
>> should be doable. I don't know if we need a way to modify the parent
>> chain after construction. It's somewhat complex to allow this while
>> still preventing cycles from being created.
>
> It would be great to see something like the above.

Unless someone explains how that graph model applies to the tree model we  
have now and what the processing model around it will, I'm not sure this  
will go anywhere.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 29 February 2012 14:25:00 UTC