layout/reftests/webcomponents/basic-shadow-3.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/webcomponents/basic-shadow-3.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <script>
     1.8 +    function tweak() {
     1.9 +      var shadowDiv = document.createElement("div");
    1.10 +      shadowDiv.style.border = "10px solid green";
    1.11 +
    1.12 +      var shadowRoot = document.getElementById('outer').createShadowRoot();
    1.13 +      shadowRoot.appendChild(shadowDiv);
    1.14 +
    1.15 +      var orangeDiv = document.createElement("div");
    1.16 +      orangeDiv.style.border = "10px solid orange";
    1.17 +
    1.18 +      var purpleDiv = document.createElement("div");
    1.19 +      purpleDiv.style.border = "10px solid purple";
    1.20 +
    1.21 +      shadowDiv.appendChild(purpleDiv);
    1.22 +      shadowDiv.insertBefore(orangeDiv, purpleDiv);
    1.23 +      shadowDiv.removeChild(purpleDiv);
    1.24 +    }
    1.25 +  </script>
    1.26 +</head>
    1.27 +<body onload="tweak()">
    1.28 +<div id="outer">
    1.29 +  <div style="background-color:red;"></div>
    1.30 +</div>
    1.31 +</body>
    1.32 +</html>

mercurial