layout/reftests/webcomponents/remove-insertion-point-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/webcomponents/remove-insertion-point-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <script>
     1.8 +    function tweak() {
     1.9 +      // div with style "border: 10px solid green"
    1.10 +      var shadowDiv = document.createElement("div");
    1.11 +      shadowDiv.style.border = "10px solid green";
    1.12 +
    1.13 +      // Insertion point will match nothing and use fallback content.
    1.14 +      var insertionPoint = document.createElement("content");
    1.15 +      shadowDiv.appendChild(insertionPoint);
    1.16 +
    1.17 +      var shadowRoot = document.getElementById('outer').createShadowRoot();
    1.18 +      shadowRoot.appendChild(shadowDiv);
    1.19 +
    1.20 +      // Remove the insertion point from the ShadowRoot, "Hello" should no
    1.21 +      // longer be rendered.
    1.22 +      shadowDiv.removeChild(insertionPoint);
    1.23 +    }
    1.24 +  </script>
    1.25 +</head>
    1.26 +<body onload="tweak()">
    1.27 +<div id="outer">Hello</div>
    1.28 +</body>
    1.29 +</html>

mercurial