mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Wait for initial navigation to complete before modifying iframe
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/
This commit is contained in:
parent
aada06757b
commit
a3149c1ce9
Notes:
sideshowbarker
2024-07-17 03:05:16 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: a3149c1ce9
Pull-request: https://github.com/SerenityOS/serenity/pull/23889
Reviewed-by: https://github.com/awesomekling
5 changed files with 40 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue