mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00

With this change `shared_history_push_replace_state()` starts to actually add/replace session history entry.
20 lines
601 B
HTML
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>
|