blob: 93df1e86d4ae59538173e341c453f0d5f44b395b (
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
|
<html>
<head>
<title>Accessible events testing for document</title>
<script>
const STATE_BUSY = Ci.nsIAccessibleStates.STATE_BUSY;
var gService = null;
function waitForDocLoad() {
if (!gService) {
gService = Cc["@mozilla.org/accessibilityService;1"].
getService(Ci.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>
|