Skip to content

Truly independent web browser

656 B
Raw Blame
<!DOCTYPE html>
<script src="../../include.js"></script>
<style>
    .red { color: red }
    .blue { color: blue }
    .shared { color: var(--missing, green) }
</style>
<div class="red">first</div>
<div class="blue">second</div>
<script>
    test(() => {
        const [first, second] = document.querySelectorAll("div");
        internals.updateStyle();
        getComputedStyle(first).color;
        getComputedStyle(second).color;

        first.className = "shared";
        second.className = "shared";
        internals.updateStyle();

        println(getComputedStyle(first).color);
        println(getComputedStyle(second).color);
    });
</script>