Skip to content

Truly independent web browser

574 B
Raw Blame
<!DOCTYPE html>
<script src="../include.js"></script>
<div id="target" style="margin-left: 5px"></div>
<script>
    test(() => {
        const replacement = target.animate({ marginLeft: ["10px", "10px"] }, 1000);
        const addition = target.animate(
            { marginLeft: ["20px", "20px"] },
            { duration: 1000, composite: "add" },
        );
        for (const animation of [replacement, addition]) {
            animation.pause();
            animation.currentTime = 500;
        }
        println(getComputedStyle(target).marginLeft);
    });
</script>