In my web worker I have a line where I set the onmessage handler like so:
onmessage = function() {/*...*/}
This works perfectly in Firefox, but in google chrome I get the following error:
Uncaught ReferenceError: onmessage is not defined
So what is wrong with my code example?
using
self.onmessageappears to have fixed the problem.