[Webkit-unassigned] [Bug 234730] load and beforeunload window event listeners callback order different in Safari than Chrome and Firefox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 6 09:04:08 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=234730

--- Comment #5 from Chris Dumez <cdumez at apple.com> ---
(In reply to Sam Sneddon [:gsnedders] from comment #3)
> useCapture shouldn't be affecting event dispatch order;
> dom/events/Event-dispatch-order.html in WPT is meant to test this but
> clearly doesn't suffice.

@Sam: Could you clarify why the event dispatch order should not be impacted by useCapture? I am looking at https://dom.spec.whatwg.org/#concept-event-dispatch and our implementation seems to match the spec:
1. First we Invoke with struct, event, "capturing", and legacyOutputDidListenersThrowFlag if given.
2. Then we Invoke with struct, event, "bubbling", and legacyOutputDidListenersThrowFlag if given.

>From https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke, some listeners are skipped during each phase based on listener's "capture".

So it makes sense to me that we're calling the ones with useCapture=true first and then the ones with useCapture=false.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220106/3848750f/attachment.htm>


More information about the webkit-unassigned mailing list