Skip to content

Truly independent web browser

1.1 KB
Raw Blame
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="../expected/svg-paint-server-hidden-inherited-style-update-ref.html">
<style>
    body {
        margin: 0;
    }

    svg {
        display: block;
    }
</style>
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
    <defs id="resources" style="display: none; --paint-color: red">
        <linearGradient id="gradient" gradientUnits="userSpaceOnUse">
            <stop offset="0" style="stop-color: var(--paint-color)" />
            <stop offset="1" style="stop-color: var(--paint-color)" />
        </linearGradient>
    </defs>
    <rect id="target" width="100" height="100" fill="url(#gradient)" />
</svg>
<script>
    requestAnimationFrame(() => {
        requestAnimationFrame(() => {
            document.getElementById("resources").style.setProperty("--paint-color", "green");
            requestAnimationFrame(() => {
                requestAnimationFrame(() => {
                    document.documentElement.classList.remove("reftest-wait");
                });
            });
        });
    });
</script>