console4Worker is console API for WebWorkers. WebWorkers are hard to debug. On top of that, console API is unavailable in WebWorkers. It doesn’t help.
console4Worker is a simple library which tries to fill this gap. It provides the console API , the same api you are used to. It implemented in most browser, node.js, even part of commonjs. See the demo in the examples/ directory.
On the Worker Side
First you include the script with this line.
1
| |
And you are done! Now you can console API as you would normally do, even if you are in a webworker. Lets say something like
1
| |
