| <!doctype html> |
| <meta charset=utf-8> |
| <title>AnimationEffectTiming and AnimationEffectTimingReadOnly IDL</title> |
| <link rel="help" |
| href="https://drafts.csswg.org/web-animations/#animationeffecttiming"> |
| <link rel="help" |
| href="https://drafts.csswg.org/web-animations/#animationeffecttimingreadonly"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/WebIDLParser.js"></script> |
| <script src="/resources/idlharness.js"></script> |
| <div id="log"></div> |
| <script type="text/plain" id="AnimationEffectTimingReadOnly-IDL"> |
| enum FillMode { "none", "forwards", "backwards", "both", "auto" }; |
| enum PlaybackDirection { |
| "normal", |
| "reverse", |
| "alternate", |
| "alternate-reverse" |
| }; |
| |
| dictionary AnimationEffectTimingProperties { |
| double delay = 0.0; |
| double endDelay = 0.0; |
| FillMode fill = "auto"; |
| double iterationStart = 0.0; |
| unrestricted double iterations = 1.0; |
| (unrestricted double or DOMString) duration = "auto"; |
| PlaybackDirection direction = "normal"; |
| DOMString easing = "linear"; |
| }; |
| |
| [Exposed=Window] |
| interface AnimationEffectTimingReadOnly { |
| readonly attribute double delay; |
| readonly attribute double endDelay; |
| readonly attribute FillMode fill; |
| readonly attribute double iterationStart; |
| readonly attribute unrestricted double iterations; |
| readonly attribute (unrestricted double or DOMString) duration; |
| readonly attribute PlaybackDirection direction; |
| readonly attribute DOMString easing; |
| }; |
| </script> |
| <script type="text/plain" id="AnimationEffectTiming-IDL"> |
| [Exposed=Window] |
| interface AnimationEffectTiming : AnimationEffectTimingReadOnly { |
| inherit attribute double delay; |
| inherit attribute double endDelay; |
| inherit attribute FillMode fill; |
| inherit attribute double iterationStart; |
| inherit attribute unrestricted double iterations; |
| inherit attribute (unrestricted double or DOMString) duration; |
| inherit attribute PlaybackDirection direction; |
| inherit attribute DOMString easing; |
| }; |
| </script> |
| <script> |
| 'use strict'; |
| |
| const idlArray = new IdlArray(); |
| |
| idlArray.add_idls( |
| document.getElementById('AnimationEffectTimingReadOnly-IDL').textContent |
| ); |
| idlArray.add_idls( |
| document.getElementById('AnimationEffectTiming-IDL').textContent |
| ); |
| |
| idlArray.add_objects({ |
| AnimationEffectTiming: [ |
| '(new KeyframeEffect(null, null)).timing' |
| ], |
| AnimationEffectTimingReadOnly: [ |
| '(new KeyframeEffectReadOnly(null, null)).timing' |
| ], |
| }); |
| idlArray.test(); |
| |
| </script> |