Re: SVG WG is asking for feedback - event propagation

The DOM hasn't specified event propigation between document trees. It looks
like it would be easy to implement bubbling, at least,  by simply
installing an event handler on the root of the referenced tree that
"bridges" (re-posts) the event to the referencing tree's <image/> node.

Capture may be more difficult to emulate, mostly because (as far as I can
remember) the event target doesn't tell us whether a capture occurred and
decided to block further processing, so the "bridge" handler doesn't know
what to do about captures lower in the referenced tree. If this is an
issue, the question becomes one of whether it should be handled by having
SVG extend the events APIs or by doing that at the DOM level.

But for bubbling, having SVG create a bridge handler when it builds the
<image/> reference seems to work perfectly well and produce the expected
results (inner document sees the event before outer, and can cancel further
processing, just as if it has been inserted at this point in the document
tree)

______________________________________
Joe Kesselman  / IBM Research

Received on Friday, 22 March 2002 09:48:49 UTC