animation-name-inline-style.html (652B)
1 <!doctype html> 2 <link rel="help" href="https://drafts.csswg.org/css-animations-1/"> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <style> 6 #target { color: red } 7 @keyframes green { 8 from, to { color: green } 9 } 10 </style> 11 <div id=target style="animation-duration: 1s"></div> 12 <script> 13 test(t => { 14 target.style.animationName = "none"; 15 assert_equals(getComputedStyle(target).color, "rgb(255, 0, 0)"); 16 target.style.animationName = "green"; 17 assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)"); 18 }, "Animation starts when the name is mutated via inline style"); 19 </script>