haikuwebkit/LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-sync-xhr-fai...

19 lines
331 B
HTML

<script>
function doSyncXHR()
{
try {
var xhr = new XMLHttpRequest();
xhr.open("GET", "xmlhttprequest-responsetype-json.json", false);
xhr.send(null);
} catch(e) {
return false;
}
return true;
}
onunload = () => {
while (!doSyncXHR()) { };
top.frameDidUnload();
}
</script>