OK. I just write a test: ``` target::before { margin-left: 10px; } ``` ``` <div id='target'></div> ``` ``` const d = document.getElementById('target'); const effect = new KeyframeEffect(null, {opacity:['0.5', '1']}, 10000); const anim = new Animation(effect, document.timeline); anim.play(); anim.currentTime = 5000; effect.target = d; effect.pseudoElement = '::before'; console.log(d.getAnimations()); console.log(document.getAnimations()); ``` I got an empty array from `d.getAnimations()` and one animation from `document.getAnimations()`.
Bug 1619821 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
OK. I just write a test: ``` target::before { margin-left: 10px; } ``` ``` <div id='target'></div> ``` ``` const d = document.getElementById('target'); const effect = new KeyframeEffect(null, {opacity:['0.5', '1']}, 10000); const anim = new Animation(effect, document.timeline); anim.play(); anim.currentTime = 5000; effect.target = d; effect.pseudoElement = '::before'; console.log(d.getAnimations({subtree: true})); console.log(document.getAnimations()); ``` I got one animation from both.
OK. I just write a test (https://jsfiddle.net/borischiou/wgsbpujr/): ``` target::before { margin-left: 10px; } ``` ``` <div id='target'></div> ``` ``` const d = document.getElementById('target'); const effect = new KeyframeEffect(null, {opacity:['0.5', '1']}, 10000); const anim = new Animation(effect, document.timeline); anim.play(); effect.target = d; effect.pseudoElement = '::before'; console.log(d.getAnimations({subtree: true})); console.log(document.getAnimations()); ``` I got one animation from both.