W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: Shadow DOM: events that are stopped

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 7 Feb 2013 09:07:03 -0600
Message-ID: <CABirCh9_ibON1NAQhtv5Pr+_p6zNhj4Cza=rWJmErjLMV9dGkg@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WebApps WG <public-webapps@w3.org>
On Thu, Feb 7, 2013 at 7:02 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> Instead of having a fixed list of events that are stopped, maybe
> instead we can pass a flag to the dispatch algorithm with respect to
> whether or not the event being dispatched should exit the shadow
> boundary it started in, if any. That way you can have your own private
> event handling in the shadow tree and for components implemented by
> the user agent they can implement certain user actions as private to
> the shadow tree as well, but if I want I could still dispatch a
> synthetic "scroll" event that goes through the boundary.
>

This definitely sounds better than having a magic list of event names
somewhere.  Event names shouldn't have special meaning.

Should this be a flag on the event?  That puts it in the same place as the
other things with an effect on how the event is dispatched (bubbles,
cancelable), and so users can set the flag along with other flags, eg. new
Event("myevent", {stopsAtBoundary: true}).

I have a "clone_event()" function, to make a copy of a cancelled native
event for re-dispatching later.  Having this flag on the event would allow
that to remain self-contained, instead of one property of the event that
needs to be passed separately to dispatchEvent.

-- 
Glenn Maynard
Received on Thursday, 7 February 2013 15:07:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT