2 <?xml-stylesheet type=
"text/css" href=
"chrome://global/skin"?>
3 <?xml-stylesheet type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"?>
4 <window title=
"HTML template in XUL"
5 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
6 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
7 <body xmlns=
"http://www.w3.org/1999/xhtml">
8 <template id=
"template">Content
<span>Content
</span></template>
9 <script type=
"application/javascript"><![CDATA[
10 add_task(async function test_template() {
11 let template = document.getElementById(
"template");
12 ok(
"content" in template,
"Template has shadow root.");
13 is(template.childNodes.length,
0,
"Template should have no children.");
14 is(template.content.childNodes.length,
2,
"Template content should have two children.");