Skip to content

Truly independent web browser

862 B
Raw Blame
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
    @keyframes parent-color { from, to { color: rgb(200, 0, 0); } }
    @keyframes child-background { from, to { background-color: green; } }
    #parent { animation: parent-color 1000s linear infinite paused; }
    #child { background-color: white; animation: child-background 1s -2s linear; }
</style>
<div id="parent"><div id="child"></div></div>
<script>
    test(() => {
        const child = document.getElementById("child");
        const style = getComputedStyle(child);
        println(`inherited value: ${style.color}`);
        println(`past effect contributes nothing: ${style.backgroundColor}`);
        println(`child effect count: ${child.getAnimations().length}`);
        println(`parent effect count: ${document.getElementById("parent").getAnimations().length}`);
    });
</script>