ladybird/Tests/LibWeb/Text/data/iframe-reload.html
Aliaksandr Kalenik 91377f3ab9 LibWeb: Fix always hanging Navigable::reload()
See spec issue https://github.com/whatwg/html/issues/9869

Previous attempt on fixing reload had to be reverted because it broke
Soundcloud and GitHub, but this change does not seem to introduce new
crashes.
2024-04-13 09:19:00 -07:00

12 lines
370 B
HTML

<script>
window.addEventListener('message', event => {
if (event.data && event.data.action === 'reload') {
window.parent.postMessage({ action: 'acknowledge-asked-to-reload' });
location.reload();
}
});
window.addEventListener('load', () => {
window.parent.postMessage({ action: 'loaded' });
});
</script>