gecko-dev/dom/workers/test/worker_referrer.js

10 строки
232 B
JavaScript

onmessage = function() {
importScripts(['referrer.sjs?import']);
var xhr = new XMLHttpRequest();
xhr.open('GET', 'referrer.sjs?result', true);
xhr.onload = function() {
postMessage(xhr.responseText);
}
xhr.send();
}