ladybird/Tests/LibWeb/Text/data/iframe-unload-event.html
Aliaksandr Kalenik d3cfe35fbd LibWeb: Do not destroy document until whole subtree completed unloading
Fixes crashing when "unload" event handler tries to access active
document that has already been destroyed.
2024-04-20 10:22:14 +02:00

10 lines
239 B
HTML

<!DOCTYPE html>
<iframe
name="test"
srcdoc="<script>window.addEventListener('unload', () => { window['test']; })</script>"
></iframe>
<script>
window.addEventListener("unload", () => {
window["test"];
});
</script>