Skip to content

Commit

Permalink
Dispatch selectionchange event per element
Browse files Browse the repository at this point in the history
According to the new spec[1], we need enqueue selectionchange event
per element. WebKit also updated the implementation of selectionchange
event in webcore[2].

[1] w3c/selection-api#172
[2] https://commits.webkit.org/276238@main

Change-Id: If2020febecdf32d6165023712442f16c6e91bd4c
  • Loading branch information
ShuangshuangZhou authored and chromium-wpt-export-bot committed Apr 22, 2024
1 parent 607e64a commit 5dc5cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selection/onselectionchange-on-distinct-text-controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
assert_equals(selectionChangeCount1, 0);
assert_equals(selectionChangeCount2, 0);
await new Promise(setTimeout);
assert_equals(selectionChangeCount1, 1);
assert_equals(selectionChangeCount1, 2);
assert_equals(selectionChangeCount2, 1);
})();
}, "selectionchange event on each input element fires independently");
Expand All @@ -39,7 +39,7 @@
assert_equals(selectionChangeCount1, 0);
assert_equals(selectionChangeCount2, 0);
await new Promise(setTimeout);
assert_equals(selectionChangeCount1, 1);
assert_equals(selectionChangeCount1, 2);
assert_equals(selectionChangeCount2, 1);
})();
}, "selectionchange event on each textarea element fires independently");
Expand Down

0 comments on commit 5dc5cb1

Please # to comment.