Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <html>
2 <head>
3 <title>Accessible events testing for document</title>
4 <script>
5 const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;
7 var gRetrieval = null;
8 function waitForDocLoad()
9 {
10 if (!gRetrieval) {
11 gRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
12 getService(Components.interfaces.nsIAccessibleRetrieval);
13 }
15 var accDoc = gRetrieval.getAccessibleFor(document);
17 var state = {};
18 accDoc.getState(state, {});
19 if (state.value & STATE_BUSY) {
20 window.setTimeout(waitForDocLoad, 0);
21 return;
22 }
24 hideIFrame();
25 }
27 function hideIFrame()
28 {
29 var iframe = document.getElementById("iframe");
30 gRetrieval.getAccessibleFor(iframe.contentDocument);
31 iframe.style.display = 'none';
32 }
33 </script>
34 </head>
36 <body onload="waitForDocLoad();">
37 <iframe id="iframe"></iframe>
38 </body>
39 </html>