Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" onload="setTimeout(boom, 30)" class="reftest-wait">
3 <script>
5 var originalRoot = document.documentElement;
6 var svgCircle;
8 function boom()
9 {
10 var SVG_NS = "http://www.w3.org/2000/svg";
12 var svgPolyline = document.createElementNS(SVG_NS, 'polyline');
13 svgCircle = document.createElementNS(SVG_NS, 'circle');
15 svgCircle.appendChild(svgPolyline);
17 document.removeChild(originalRoot);
18 document.appendChild(svgCircle);
20 setTimeout(restore, 30);
21 }
23 function restore()
24 {
25 // We have to put it the root element back in the document so that reftest.js
26 // sees the event for the removal of class="reftest-wait"!
27 document.removeChild(svgCircle);
28 document.appendChild(originalRoot);
29 document.documentElement.removeAttribute("class");
30 }
32 </script>
34 </svg>