1 importScripts("worker-pre.js");
3 onmessage = function(event
)
5 if (event
.data
== "START")
11 postMessage("log " + message
);
21 var xhr
= new XMLHttpRequest();
22 xhr
.open("GET", "http://localhost:8000/xmlhttprequest/workers/resources/access-control-preflight-request-headers-referer.php");
23 // Add a non-simple header to make CORS preflight happen.
24 xhr
.setRequestHeader("X-Custom-Header", "PASS");
25 xhr
.onerror = function () {
29 xhr
.onload = function () {
30 log(xhr
.responseText
);