blob: 86ddfac5e08556708ffb4d81bbd43b09312f262c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<html>
<head>
<title>Accessible events testing for document</title>
<script>
const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;
var gService = null;
function waitForDocLoad()
{
if (!gService) {
gService = Components.classes["@mozilla.org/accessibilityService;1"].
getService(Components.interfaces.nsIAccessibilityService);
}
var accDoc = gService.getAccessibleFor(document);
var state = {};
accDoc.getState(state, {});
if (state.value & STATE_BUSY) {
window.setTimeout(waitForDocLoad, 0);
return;
}
hideIFrame();
}
function hideIFrame()
{
var iframe = document.getElementById("iframe");
gService.getAccessibleFor(iframe.contentDocument);
iframe.style.display = 'none';
}
</script>
</head>
<body onload="waitForDocLoad();">
<iframe id="iframe"></iframe>
</body>
</html>
|