mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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>
|