JSFiddle - React, Tailwind, and code Playground
HTML
An alert should show up in Opera.
<br>
See <a href="http://stackoverflow.com/a/10372280/938089">How to create a Web Worker from a string</a>
JavaScript
// "Server response", used in all examples
var response = "self.onmessage=function(e){postMessage('Worker: '+e.data);}";
// response as defined in the first example
var worker = new Worker('data:application/javascript,' +
encodeURIComponent(response) );
// Test, used in all examples:
worker.onmessage = function(e) {
alert('Response: ' + e.data);
};
worker.postMessage('Test');