mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Pageshow event dispatched by the user agent should be trusted
The spec says that "isTrusted is a convenience that indicates whether an event is dispatched by the user agent (as opposed to using dispatchEvent())" But when dispatching a pageshow event the flag was incorrectly set to false. This fixes https://wpt.fyi/results/html/syntax/parsing/the-end.html
This commit is contained in:
parent
64f18a93c2
commit
d2fbbabd89
Notes:
github-actions[bot]
2024-10-30 09:28:15 +00:00
Author: https://github.com/alankemp 🔰
Commit: d2fbbabd89
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2008
3 changed files with 18 additions and 0 deletions
14
Tests/LibWeb/Text/input/HTML/pageshow-event-istrusted.html
Normal file
14
Tests/LibWeb/Text/input/HTML/pageshow-event-istrusted.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script src="../include.js"></script>
|
||||
<iframe id="i"></iframe>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
window.addEventListener("pageshow", (e) => {
|
||||
if (e.isTrusted) {
|
||||
println("PASS");
|
||||
} else {
|
||||
println("FAIL");
|
||||
}
|
||||
done();
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue