summaryrefslogtreecommitdiffstats
path: root/layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html
blob: 29a850e90f1417d7f768af018b39355944fc1623 (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
<!DOCTYPE html>
<html class="reftest-wait">
  <head>
  </head>
  <body>
    <div id="host"></div>
    <script>
      var host = document.getElementById("host");
      var root = host.createShadowRoot();
      root.innerHTML = "<span>a</span>";

      function tweak() {
        var span = document.createElement("span");
        span.innerHTML = "b";

        // Span should not be visible because it is not distributed to any
        // insertion points in the shadow DOM.
        host.appendChild(span);

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

      window.addEventListener("MozReftestInvalidate", tweak, false);
    </script>
  </body>
</html>