Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
body { margin: 0; }
#group { opacity: 0.5; }
iframe { width: 200px; height: 120px; border: 0; }
</style>
<div id="group"><iframe id="frame" srcdoc="<body style='margin: 0; background: blue'></body>"></iframe></div>
<script>
promiseTest(async () => {
await new Promise(resolve => {
// The initial about:blank document is complete too, before the srcdoc document replaces it.
if (frame.contentDocument && frame.contentDocument.URL === "about:srcdoc" && frame.contentDocument.readyState === "complete") {
resolve();
return;
}
frame.onload = resolve;
});
await animationFrame();
println(internals.dumpDisplayList());
});
</script>