mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Fire navigation event as required in History.pushState()
This commit is contained in:
parent
e3408c4a7f
commit
a1519e67fb
Notes:
github-actions[bot]
2024-08-06 14:34:10 +00:00
Author: https://github.com/awesomekling
Commit: a1519e67fb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/993
3 changed files with 28 additions and 5 deletions
14
Tests/LibWeb/Text/input/HTML/pushState-navigation-event.html
Normal file
14
Tests/LibWeb/Text/input/HTML/pushState-navigation-event.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
let handler = function() {
|
||||
println("PASS");
|
||||
|
||||
window.navigation.removeEventListener("navigate", handler);
|
||||
history.pushState({}, null, "pushState-navigation-event.html");
|
||||
done();
|
||||
};
|
||||
window.navigation.addEventListener("navigate", handler);
|
||||
history.pushState({}, null, "?ok");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue