michael@0: /** michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: onmessage = function(event) { michael@0: throw "No messages should reach me!"; michael@0: } michael@0: michael@0: var xhr = new XMLHttpRequest(); michael@0: xhr.open("GET", "testXHR.txt", false); michael@0: xhr.addEventListener("loadstart", function () michael@0: { michael@0: // Tell the parent to terminate us. michael@0: postMessage("TERMINATE"); michael@0: // And wait for it to do so. michael@0: while(1) { true; } michael@0: }); michael@0: xhr.send(null);