CSSAnimation-id.tentative.html (809B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSSAnimation.id</title> 4 <!-- TODO: Add a more specific link for this once it is specified. --> 5 <link rel="help" href="https://drafts.csswg.org/css-animations-2/#cssanimation"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="support/testcommon.js"></script> 9 <style> 10 @keyframes abc { } 11 </style> 12 <div id="log"></div> 13 <script> 14 'use strict'; 15 16 test(t => { 17 const div = addDiv(t); 18 div.style.animation = 'abc 100s'; 19 const animation = div.getAnimations()[0]; 20 assert_equals(animation.id, '', 'id for CSS Animation is initially empty'); 21 22 animation.id = 'anim' 23 assert_equals(animation.id, 'anim', 'animation.id reflects the value set'); 24 }, 'Animation.id for CSS Animations'); 25 26 </script> 27 </html>