mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Fire navigation event as required in History.pushState()
This commit is contained in:
committed by
Andreas Kling
parent
e3408c4a7f
commit
a1519e67fb
Notes:
github-actions[bot]
2024-08-06 14:34:10 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/a1519e67fb7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/993
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>
|
||||
Reference in New Issue
Block a user