forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidlharness.html
38 lines (34 loc) · 1.09 KB
/
idlharness.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<title>Input Event IDL tests</title>
<link rel="help" href="https://w3c.github.io/input-events/#h-interface-inputevent"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<pre id="untested_idl">
interface InputEvent {
};
</pre>
<pre id='idl'>
partial interface InputEvent {
readonly attribute DOMString inputType;
readonly attribute DataTransfer? dataTransfer;
sequence<StaticRange> getTargetRanges();
};
partial dictionary InputEventInit {
DOMString inputType = "";
DataTransfer? dataTransfer = null;
sequence<StaticRange> targetRanges = [];
};
</pre>
<script>
(function(){
"use strict";
const idl_array = new IdlArray();
idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
idl_array.add_idls(document.getElementById("idl").textContent);
idl_array.add_objects({
InputEvent: ['new InputEvent("foo")'],
});
idl_array.test();
})();
</script>