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

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <script>
     5     function tweak() {
     6       // div with style "border: 10px solid green"
     7       var shadowDiv = document.createElement("div");
     8       shadowDiv.style.border = "10px solid green";
    10       // Insertion point will match nothing and use fallback content.
    11       var insertionPoint = document.createElement("content");
    12       shadowDiv.appendChild(insertionPoint);
    14       var shadowRoot = document.getElementById('outer').createShadowRoot();
    15       shadowRoot.appendChild(shadowDiv);
    17       // Remove the insertion point from the ShadowRoot, "Hello" should no
    18       // longer be rendered.
    19       shadowDiv.removeChild(insertionPoint);
    20     }
    21   </script>
    22 </head>
    23 <body onload="tweak()">
    24 <div id="outer">Hello</div>
    25 </body>
    26 </html>

mercurial