Re: [DOM4] EventTarget as first class citizen

Note, I don't think that anyone is suggesting to add
.parentNode/.eventTargetParent to the EventTarget interface. But
rather just to objects instantiated through the constructor described
in this thread.

We can either do that by inserting another interface which just
contains this new property. Or by adding the property on the instances
themselves. I don't have a strong opinion either way, but it would
seem nice if we can still call the constructor 'EventTarget'.

/ Jonas

On Sat, Mar 3, 2012 at 11:35 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Wed, 29 Feb 2012 19:30:01 +0100, Dimitri Glazkov <dglazkov@chromium.org>
> wrote:
>>
>> Right--and that part would still have to stay that way for a while.
>> However, for non-DOM objects, we can use parentNode to create event
>> ancestor lists and that would be nifty in the sense of consistency.
>>
>> Also, I remember arv and Alex having some thoughts on this subject.
>> Maybe their thoughts are more interesting than mine.
>
>
> I'm not sure it would make sense to add parentNode to EventTarget as then it
> would also be added to a bunch of places where it does not make much sense,
> such as XMLHttpRequest and WebSocket. Can developers not maintain the parent
> chain themselves?
>
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>

Received on Saturday, 3 March 2012 23:41:35 UTC