Newer
Older
minerva / Tests / LibWeb / Text / input / WebAnimations / misc / get-animations-should-make-sure-style-is-updated.html
@minerva minerva on 13 Jul 597 bytes Initial commit
<!DOCTYPE html>
<script src="../../include.js"></script>
<style>
    @keyframes test {
        from {
            background-color: green;
        }
        to {
            background-color: yellow;
        }
    }

    #animated {
        width: 100px;
        height: 100px;
        background-color: green;
        animation: test 2s infinite;
    }
</style>
<div id="animated">This is a animated div</div>
<script>
    const animationCount = document.getElementById("animated").getAnimations().length;
    test(() => {
        println(`animation count: ${animationCount}`);
    });
</script>