LibWeb: Fire navigation event as required in History.pushState()

This commit is contained in:
Andreas Kling 2024-08-06 14:18:40 +02:00 committed by Andreas Kling
commit a1519e67fb
Notes: github-actions[bot] 2024-08-06 14:34:10 +00:00
3 changed files with 28 additions and 5 deletions

View 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>