When writing the onmessage callback for a Web Worker I get an "Uncaught Error: SYNTAX_ERR: DOM Exception 12" in my console when I try to send another postMessage().
var w = new Worker(url);
w.onmessage = function(e) {
if(e.data.msg=='validate'){
if(validateWork(e.data.wrk)){
postMessage('proceed');
}
}
}
You must call postMessage() using this when in a callback.