mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 22:12:56 +00:00
This change ensures that when then the code corresponding to the “create an event” operation at https://dom.spec.whatwg.org/#concept-event-create is called, the event’s isTrusted is set to true — as the spec requires. That causes the failures for the following WPT tests to pass: - https://wpt.fyi/results/html/semantics/forms/the-input-element/checkbox.html?run_id=5080423051034624 - https://wpt.fyi/results/html/semantics/interactive-elements/the-dialog-element/dialog-close.html?run_id=5080423051034624 …and there are likely a number of similar WPT tests that hit this same code path which this commit will cause to be changed to passes. Otherwise, without this change, the “create event” implementation doesn’t conform to the spec requirements – nor behave interoperably with other existing engines — and those WPT test would continue to fail. This change also ensures that isTrusted continues to be set to false for synthetic events.
6 lines
155 B
HTML
6 lines
155 B
HTML
<script src="include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
println(`new Event('x').isTrusted is ${new Event('x').isTrusted}`);
|
|
});
|
|
</script>
|