1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00
serenity/Tests/LibWeb/Text/input/navigation/history-pushstate-iframe.html
Aliaksandr Kalenik 7cdbd59e92 LibWeb: Update session history when History entry is pushed/replaced
With this change `shared_history_push_replace_state()` starts to
actually add/replace session history entry.
2023-09-23 17:59:10 -06:00

20 lines
601 B
HTML

<script src="../include.js"></script>
<script>
try {
const initialHistoryLength = window.history.length;
history.pushState({}, "hello", "history-pushstate-iframe.html#hello");
if (window.self !== window.top) {
parent.postMessage(
"history object length has changed by " +
(window.history.length - initialHistoryLength),
"*"
);
} else {
test(() => {});
}
} catch (e) {
if (window.self !== window.top) parent.postMessage("ERROR:" + e, "*");
}
</script>