summaryrefslogtreecommitdiffstats
path: root/layout/reftests/webcomponents/update-dist-node-descendants-1.html
blob: 3ba96594bf09a18e9e6a4147fd8e65ec4c576859 (plain)
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
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
</head>
<body>
<div id="outer"><span id="distnode">text</span></div>
<script>

function run() {
  var shadowRoot = document.getElementById('outer').createShadowRoot();
  shadowRoot.innerHTML = '<div><content></content></div>';
}

  function tweak() {
    var distNode = document.getElementById("distnode");
    distNode.textContent = "Hello World";

    document.documentElement.removeAttribute("class");
	}

if (document.body.createShadowRoot) {
  run();
  window.addEventListener("MozReftestInvalidate", tweak);
} else {
  document.documentElement.className = "";
}
</script>
</body>
</html>