blob: d2b6691b8aa4baae4048acfdb8d0a2f4aa9d7884 [file] [log] [blame]
var message = "importScripts allowed";
try {
importScripts("/content-security-policy/support/post-message.js");
} catch (e) {
message = "importScripts blocked";
}
if (typeof SharedWorkerGlobalScope === "function") {
onconnect = function (e) {
var port = e.ports[0];
port.onmessage = function () { port.postMessage(message); }
port.postMessage(message);
};
} else if (typeof DedicatedWorkerGlobalScope === "function") {
self.postMessage(message);
}