mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
LibWeb/HTML: Make command events not composed
Also re-import the affected button-event-dispatch test.
Corresponds to:
787316d519
This commit is contained in:
Notes:
github-actions[bot]
2025-12-01 11:09:26 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/ed5169af8d3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6960
@@ -225,7 +225,7 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
|
||||
// 5. Let continue be the result of firing an event named command at target, using CommandEvent, with its
|
||||
// command attribute initialized to command, its source attribute initialized to element, and its cancelable
|
||||
// and composed attributes initialized to true.
|
||||
// attribute initialized to true.
|
||||
// NOTE: DOM standard issue #1328 tracks how to better standardize associated event data in a way which makes
|
||||
// sense on Events. Currently an event attribute initialized to a value cannot also have a getter, and so
|
||||
// an internal slot (or map of additional fields) is required to properly specify this.
|
||||
@@ -233,7 +233,6 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
event_init.command = command;
|
||||
event_init.source = this;
|
||||
event_init.cancelable = true;
|
||||
event_init.composed = true;
|
||||
|
||||
auto event = CommandEvent::create(realm(), HTML::EventNames::command, move(event_init));
|
||||
event->set_is_trusted(true);
|
||||
|
||||
Reference in New Issue
Block a user