ladybird/Tests/LibWeb/Text/input/WebAnimations/animation-properties/timeline.html
Matthew Olsson 2bd8093449 LibWeb: Detect explicit null timeline given in KeyframeAnimationOptions
We already do this for the timeline argument in the KeyframeEffect
constructor
2024-05-29 08:18:24 +02:00

13 lines
533 B
HTML

<!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 no timeline: ${animation.timeline === null}`);
});
</script>