mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
39 lines
936 B
HTML
39 lines
936 B
HTML
<html>
|
|
<head>
|
|
<title>Accessible events testing for document</title>
|
|
<script>
|
|
const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;
|
|
|
|
var gService = null;
|
|
function waitForDocLoad()
|
|
{
|
|
if (!gService) {
|
|
gService = Components.classes["@mozilla.org/accessibilityService;1"].
|
|
getService(Components.interfaces.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>
|