Search code examples
htmlconsoleweb-worker

web worker console.log


Is it just me, or is console.log() too much to ask for from HTML5 web workers?

I know that manipulating the DOM is blocked because it is potentially dangerous, but is there really any possibility that console.log() could be maliciously exploited by a multithreaded worker?


Solution

  • Agreed things would be a lot nicer, but it's not too hard to hack up a primitive console.log using postMessage. David Flanagan has a nice wrapper here.