mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
LibWeb: Add popstate event support
It is going to be useful in writing tests for History API.
This commit is contained in:
parent
0ffc338406
commit
ee3dd7977d
Notes:
sideshowbarker
2024-07-17 16:42:19 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: ee3dd7977d
Pull-request: https://github.com/SerenityOS/serenity/pull/23933
11 changed files with 134 additions and 3 deletions
9
Tests/LibWeb/Text/data/iframe-popstate-event.html
Normal file
9
Tests/LibWeb/Text/data/iframe-popstate-event.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script>
|
||||
window.history.pushState({}, '', '');
|
||||
|
||||
window.addEventListener('popstate', (e) => {
|
||||
parent.postMessage('popstate event from iframe', '*');
|
||||
});
|
||||
|
||||
window.history.back();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue