From eecfbf9a0eb6987aead49a9286e54ff97cd21db6 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 10 Apr 2019 10:59:49 +0200 Subject: [PATCH] Non-bubbling event should run non-capture listeners This fixes a regression from #686. Tests: various tests were failing because of this. https://github.com/web-platform-tests/wpt/pull/16307 aligns the remaining failing test with the new model. Fixes #742. --- dom.bs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dom.bs b/dom.bs index c550d604e..8a7314284 100644 --- a/dom.bs +++ b/dom.bs @@ -1405,15 +1405,21 @@ for discussion).
  • -

    If event's {{Event/bubbles}} attribute is true, then for each - struct in event's path: +

    For each struct in event's path:

    1. If struct's target is non-null, then set event's {{Event/eventPhase}} attribute to {{Event/AT_TARGET}}. -

    2. Otherwise, set event's {{Event/eventPhase}} attribute to - {{Event/BUBBLING_PHASE}}. +

    3. +

      Otherwise: + +

        +
      1. If event's {{Event/bubbles}} attribute is false, then + continue. + +

      2. Set event's {{Event/eventPhase}} attribute to {{Event/BUBBLING_PHASE}}. +

    4. Invoke with struct, event, "bubbling", and legacyOutputDidListenersThrowFlag if given.