Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
body {
margin: 0;
}
iframe {
width: 120px;
height: 80px;
border: 0;
}
</style>
<iframe id="frame" srcdoc="<body style='margin: 0; background: green'></body>"></iframe>
<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>