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