mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
12 lines
401 B
HTML
12 lines
401 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
window.history.pushState({}, '', window.location.href + '#test');
|
|
|
|
window.addEventListener('popstate', (e) => {
|
|
const url = new URL(window.location.href);
|
|
const pathWithHash = url.pathname.split('/').pop() + url.hash;
|
|
parent.postMessage(`popstate event from iframe new_path=${pathWithHash}`, '*');
|
|
});
|
|
|
|
window.history.back();
|
|
</script>
|