servo/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationPlaybackEvent/idlharness.html

46 lines
1.2 KiB
HTML

<!doctype html>
<meta charset=utf-8>
<title>AnimationPlaybackEvent IDL</title>
<link rel="help"
href="https://w3c.github.io/web-animations/#animationplaybackevent">
<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="AnimationPlaybackEvent-IDL">
dictionary EventInit {
boolean bubbles = false;
boolean cancelable = false;
boolean composed = false;
};
dictionary AnimationPlaybackEventInit : EventInit {
double? currentTime = null;
double? timelineTime = null;
};
[Exposed=Window,
Constructor (DOMString type,
optional AnimationPlaybackEventInit eventInitDict
)]
interface AnimationPlaybackEvent : Event {
readonly attribute double? currentTime;
readonly attribute double? timelineTime;
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
idlArray.add_untested_idls('interface Event {};');
idlArray.add_idls(
document.getElementById('AnimationPlaybackEvent-IDL').textContent
);
idlArray.add_objects({
AnimationPlaybackEvent: [ 'new AnimationPlaybackEvent(\'cancel\')' ],
});
idlArray.test();
</script>