[whatwg] seamless iframes and event propagation

Hayato Ito hayato at chromium.org
Wed Dec 5 02:54:27 PST 2012


Shadow DOM's event retargeting in WebKit uses one Event object for
every shadow trees.
When crossing shadow boundaries, an Event object's target (or
relatedTarget) is set to the appropriate one, but the event object
itself is reused.

FYI.
I've tried to implement event retargeting for seamless iframes in
WebKit just for an experiment.
https://bugs.webkit.org/show_bug.cgi?id=91290

There, I created an Event object per frame. You can see the design in
the ChangeLog of the patch. Please don't take it seriously. It should
be considered as just an experiment at this stage.
https://bugs.webkit.org/attachment.cgi?id=168866&action=review



On Wed, Dec 5, 2012 at 6:46 PM, Anne van Kesteren <annevk at annevk.nl> wrote:
> On Wed, Dec 5, 2012 at 1:02 AM, Ian Hickson <ian at hixie.ch> wrote:
>> I've done the HTML side of this (a paragraph), but the heavy lifting for
>> this will be in DOM. Anne and I spoke about this earlier in #whatwg if you
>> want to see the discussions. Some pointers to the logs can be found in the
>> relevant DOM bug:
>>
>>    https://www.w3.org/Bugs/Public/show_bug.cgi?id=18780
>
> So reading this thread it seems not everyone is on the same page as to
> whether all events (including synthetic), or just some will go
> cross-boundary. Ian and I thus far have been discussing a model where
> all events would go across boundaries.
>
> What would also be useful to know for the new dispatch design is what
> exactly the Shadow DOM is going to do. Will there be an Event object
> per "tree" or one Event object for the interleaved tree? (I guess both
> designs can be made to work. Shadow DOM will just have to set event
> parent/cross-boundary event parent as appropriate.)
>
> And finally, how should I deal with the 'load' exception for Window?
> If this object is the event parent of a Document and the event type is
> load, do nothing?
>
>
> --
> http://annevankesteren.nl/



-- 
Hayato



More information about the whatwg mailing list