mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
40 lines
944 B
HTML
40 lines
944 B
HTML
<html>
|
|
<head>
|
|
<title>Accessible events testing for document</title>
|
|
<script>
|
|
const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;
|
|
|
|
var gRetrieval = null;
|
|
function waitForDocLoad()
|
|
{
|
|
if (!gRetrieval) {
|
|
gRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
|
getService(Components.interfaces.nsIAccessibleRetrieval);
|
|
}
|
|
|
|
var accDoc = gRetrieval.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");
|
|
gRetrieval.getAccessibleFor(iframe.contentDocument);
|
|
iframe.style.display = 'none';
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="waitForDocLoad();">
|
|
<iframe id="iframe"></iframe>
|
|
</body>
|
|
</html>
|