1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:17:45 +00:00

LibWeb: Add a few Animation property tests

This commit is contained in:
Matthew Olsson 2024-03-07 09:48:26 -07:00 committed by Alexander Kalenik
parent d76c2d45c4
commit d7ad134ae5
8 changed files with 110 additions and 0 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<div id="foo"></div>
<script src="../../include.js"></script>
<script>
test(() => {
const foo = document.getElementById("foo");
let animation = foo.animate({ opacity: [0, 1] });
println(`Animation's default timeline is the document's timeline: ${animation.timeline === document.timeline}`);
animation = foo.animate({ opacity: [0, 1] }, { timeline: null });
println(`Animation created with null timeline has the document's timeline: ${animation.timeline === document.timeline}`);
});
</script>