mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
If initial src of an iframe is "about:blank", it does synchronous navigation that is not supposed to be interleaved by other navigation or usage of Document.open(). Fixes crashing in navigation on https://twinings.co.uk/
22 lines
601 B
HTML
22 lines
601 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<body></body>
|
|
<script>
|
|
const iframe = document.createElement("iframe");
|
|
document.body.appendChild(iframe);
|
|
|
|
const iframeDocument = iframe.contentDocument;
|
|
|
|
iframeDocument.open();
|
|
iframeDocument.write(
|
|
"<!DOCTYPE html><html><head><title>Iframe Content</title></head><body>"
|
|
);
|
|
iframeDocument.write("<h1>Hello</h1>");
|
|
iframeDocument.write("<p>from iframe</p>");
|
|
iframeDocument.write("</body></html>");
|
|
iframeDocument.close();
|
|
|
|
test(() => {
|
|
println("PASS (didn't crash)");
|
|
})
|
|
</script>
|