W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

Re: [DOM4] EventTarget as first class citizen

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 5 Mar 2012 17:52:42 -0800
Message-ID: <CA+c2ei-1KarhN=z6JtH3EQ4vO3rFjW-x0q7+EFmWzyG_ED-Mgw@mail.gmail.com>
To: Erik Arvidsson <arv@chromium.org>
Cc: Anne van Kesteren <annevk@opera.com>, Boris Zbarsky <bzbarsky@mit.edu>, Dimitri Glazkov <dglazkov@chromium.org>, www-dom@w3.org, Alex Russell <slightlyoff@google.com>
On Mon, Mar 5, 2012 at 10:26 AM, Erik Arvidsson <arv@chromium.org> wrote:
> On Sat, Mar 3, 2012 at 15:40, Jonas Sicking <jonas@sicking.cc> wrote:
>> 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.
> FWIW, some JS libraries have custom EventTarget implementations and
> they use parentEventTarget as a way to determine how to do the
> propagation.
> One problem with only allowing the parent in the constructor is that
> it becomes read only. Most use cases for custom EventTargets that
> involve propagation also requires being able to reparent that objects.

Cool, so if people are doing this already, with modifyable
.parentEventTarget, then I think we should do that. Allowing it to be
modified is really only a matter of checking for cycles the the
property is assigned to.

/ Jonas
Received on Tuesday, 6 March 2012 01:53:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC