<!DOCTYPE html><style>.greenbox{width:100px;height:100px;background-color:#00ff00;}</style><scriptsrc="/web-animations/testcommon.js"></script><scriptsrc="../common.js"></script><scriptid="iframe_worklet"type="text/worklet">registerAnimator("iframe_animator",class{animate(currentTime,effect){effect.localTime=600;}});registerAnimator("duplicate_animator",class{animate(currentTime,effect){effect.localTime=800;}});</script><divid="iframe_target"class="greenbox"></div><script>runInAnimationWorklet(document.getElementById('iframe_worklet').textContent).then(_=>{consttarget=document.getElementById('iframe_target');// Only create an animation for iframe_animator.consteffect=newKeyframeEffect(target,[{opacity:0}],{duration:1000});constanimation=newWorkletAnimation('iframe_animator',effect);animation.play();// wait until local times are synced back to the main thread.waitForAnimationFrameWithCondition(_=>{returngetComputedStyle(target).opacity!='1';}).then(_=>{window.parent.postMessage(getComputedStyle(target).opacity,'*');});});</script>