1 2 3 4 5 6
self.addEventListener("connect", function(e) { var port = e.ports[0]; port.onmessage = function(e) { port.postMessage(eval(e.data)); }; });