LibWeb: Add popstate event support

It is going to be useful in writing tests for History API.
This commit is contained in:
Aliaksandr Kalenik 2024-04-10 21:25:31 -07:00 committed by Andreas Kling
commit ee3dd7977d
Notes: sideshowbarker 2024-07-17 16:42:19 +09:00
11 changed files with 134 additions and 3 deletions

View file

@ -0,0 +1,9 @@
<script>
window.history.pushState({}, '', '');
window.addEventListener('popstate', (e) => {
parent.postMessage('popstate event from iframe', '*');
});
window.history.back();
</script>