blob: 8cd092147cb107e45a7206dcbe6c09b3a983f1b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
(function ()
{
var workerSource = document.getElementById('inlineWorker');
var blob = new Blob([workerSource.textContent]);
// can I create a new script tag like this? ack...
var url = window.URL.createObjectURL(blob);
try {
var worker = new Worker(url);
}
catch (e) {
done();
}
worker.addEventListener('message', function(e) {
assert_unreached("script ran");
}, false);
worker.postMessage('');
})();
|