Skip to content

Truly independent web browser

700 B
Raw Blame
<!DOCTYPE html>
<link rel="match" href="../expected/nested-html-element-does-not-paint-root-background-ref.html">
<style>
    body { margin: 0; background: #fd0; }
    main { height: 100px; margin: 20px; background: #39c; }
</style>
<main></main>
<div id="light"></div>
<div id="host"></div>
<script>
    // Neither html element is the document element, so neither paints the body's background over the canvas.
    document.getElementById("light").append(document.createElement("html"));
    const root = document.getElementById("host").attachShadow({ mode: "open" });
    const html = document.createElement("html");
    html.append(document.createElement("body"));
    root.append(html);
</script>