1
0
Fork 0
firefox/dom/xhr/tests/file_sync_xhr_nested_helper.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
778 B
HTML

<!DOCTYPE HTML>
<html>
<body>
<input />
<script>
const input = document.querySelector("input");
input.addEventListener("keydown", function() {
window.opener.receivedInput();
window.close();
});
function startSlowXHR() {
setTimeout(function() {
input.focus();
SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
var win = Services.wm.getMostRecentBrowserWindow();
EventUtils.synthesizeKey("a", {}, win);
});
var xhr = new XMLHttpRequest();
xhr.open("GET", "slow.sjs", false);
xhr.send(null);
window.opener.childXHRFinished = true;
}, 0);
}
</script>
</body>
</html>