LibWeb: Copy the keyframes in KeyframeEffect's copy constructor

This commit is contained in:
Matthew Olsson 2024-06-02 10:09:30 -07:00 committed by Andreas Kling
commit b5c682bc2e
Notes: sideshowbarker 2024-07-17 06:39:26 +09:00
3 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<script src="../../include.js"></script>
<script>
test(() => {
let effect = new KeyframeEffect(null, [{ marginLeft: "10px" }]);
let copiedEffect = new KeyframeEffect(effect);
let copiedKeyframes = copiedEffect.getKeyframes();
println(`anim count: ${copiedKeyframes.length}`);
if (copiedKeyframes.length > 0)
println(`keyframe: ${JSON.stringify(copiedKeyframes[0])}`);
})
</script>