summaryrefslogtreecommitdiffstats
path: root/layout/reftests/webcomponents/dynamic-shadow-element-1.html
blob: 0142164a1a73692f51873a747121b8017363ffa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE HTML>
<html>
<head>
  <script>
    function tweak() {
      var oldestShadow = document.getElementById('outer').createShadowRoot();
      oldestShadow.innerHTML = 'Hello';

      var olderShadow = document.getElementById('outer').createShadowRoot();

      var youngerShadow = document.getElementById('outer').createShadowRoot();
      youngerShadow.innerHTML = '<div style="background-color:green"><shadow></shadow></div>';

      olderShadow.innerHTML = '<shadow></shadow> World';
    }
  </script>
</head>
<body onload="tweak()">
<div id="outer">
  <div style="width:300px; height:100px; background-color:red;"></div>
</div>
</body>
</html>