Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>idlharness: partial dictionaries</title>
<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="../../../idl-helper.js"></script>
</head>
<body>
<pre id='idl'>
dictionary A {};
partial dictionary A {
boolean B;
};
partial dictionary A {
boolean C;
};
</pre>
<script>
'use strict';
test(() => {
let idlArray = new IdlArray();
idlArray.add_idls(document.getElementById('idl').textContent);
idlArray.test();
let members = idlArray.members["A"].members.map(m => m.name);
assert_array_equals(members, ["B", "C"], 'A should contain B, C');
}, 'Partial dictionaries');
</script>
</body>
</html>