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
|
<!DOCTYPE HTML>
<meta charset=UTF-8>
<title>css-toggles IDL tests</title>
<link rel="help" href="https://tabatkins.github.io/css-toggle/#dom">
<link rel="help" href="https://github.com/tabatkins/css-toggle/issues/29">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/WebIDLParser.js></script>
<script src=/resources/idlharness.js></script>
<script src="support/toggle-helpers.js"></script>
<div id="toggles" style="toggle-root: mytoggle 3 at 1"></div>
<script type="module">
'use strict';
await wait_for_toggle_creation(document.getElementById("toggles"));
idl_test(
['css-toggle.tentative'],
['dom'],
idl_array => {
idl_array.add_objects({
CSSToggleMap: ['document.getElementById("toggles").toggles'],
CSSToggle: [
'document.getElementById("toggles").toggles.get("mytoggle")',
'new CSSToggle()',
'new CSSToggle({ value: 3, states: 7, group: true, scope: "narrow", cycle: "cycle-on"})',
'new CSSToggle({ value: "four", states: ["one", "two", "four", "eight"], group: false, scope: "wide", cycle: "sticky"})',
],
});
}
);
</script>
|