2010-06-17 19:43:58 -07:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Accessible events testing for document</title>
|
|
|
|
<script>
|
2011-01-25 22:35:51 -08:00
|
|
|
const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;
|
|
|
|
|
|
|
|
var gRetrieval = null;
|
|
|
|
function waitForDocLoad()
|
2010-06-17 19:43:58 -07:00
|
|
|
{
|
2011-01-25 22:35:51 -08:00
|
|
|
if (!gRetrieval) {
|
|
|
|
gRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
|
|
|
getService(Components.interfaces.nsIAccessibleRetrieval);
|
|
|
|
}
|
2010-06-17 19:43:58 -07:00
|
|
|
|
2011-01-25 22:35:51 -08:00
|
|
|
var accDoc = gRetrieval.getAccessibleFor(document);
|
2010-06-17 19:43:58 -07:00
|
|
|
|
2011-01-25 22:35:51 -08:00
|
|
|
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);
|
2010-06-17 19:43:58 -07:00
|
|
|
iframe.style.display = 'none';
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
2011-01-25 22:35:51 -08:00
|
|
|
<body onload="waitForDocLoad();">
|
2010-06-17 19:43:58 -07:00
|
|
|
<iframe id="iframe"></iframe>
|
|
|
|
</body>
|
|
|
|
</html>
|