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

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <script>
     5     function tweak() {
     6       // div with style "border: 10px solid green"
     7       var outerShadow = document.createElement("div");
     8       outerShadow.style.border = "10px solid green";
    10       var outerInsertionPoint = document.createElement("content");
    11       outerShadow.appendChild(outerInsertionPoint);
    13       // div with style "border: 10px solid orange"
    14       var innerShadow = document.createElement("div");
    15       innerShadow.style.border = "10px solid orange";
    17       var innerInsertionPoint = document.createElement("content");
    18       innerShadow.appendChild(innerInsertionPoint);
    20       outerShadow.createShadowRoot().appendChild(innerShadow);
    22       var shadowRoot = document.getElementById('outer').createShadowRoot();
    23       shadowRoot.appendChild(outerShadow);
    24     }
    25   </script>
    26 </head>
    27 <body onload="tweak()">
    28 <div id="outer">Hello</div>
    29 </body>
    30 </html>

mercurial