2015-06-05 02:20:13 +03:00
|
|
|
function handleRequest(request, response)
|
|
|
|
{
|
|
|
|
if (request.queryString == "result") {
|
|
|
|
response.write(getState("referer"));
|
2015-11-19 01:13:28 +03:00
|
|
|
setState("referer", "INVALID");
|
|
|
|
} else if (request.queryString == "worker") {
|
2015-06-05 02:20:13 +03:00
|
|
|
response.setHeader("Content-Type", "text/javascript", false);
|
|
|
|
response.write("onmessage = function() { postMessage(42); }");
|
|
|
|
setState("referer", request.getHeader("referer"));
|
2015-11-19 01:13:28 +03:00
|
|
|
} else if (request.queryString == 'import') {
|
|
|
|
setState("referer", request.getHeader("referer"));
|
2019-01-31 01:21:26 +03:00
|
|
|
response.setHeader("Content-Type", "text/javascript", false);
|
2015-11-19 01:13:28 +03:00
|
|
|
response.write("'hello world'");
|
2015-06-05 02:20:13 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|