JavaScript WebWorker
- web worker
- 创建
- new Worker(‘worker.js’,{name : ‘myw’})
- new Worker(window.URL.createObjectURL(new Blob([‘console.info(“worker”)’])))
- 信息传递
- postMessage
- onMessage
- addEventListener(‘event-tag’, callback)
- onError
- addEventListener (‘error’ callback)
- 关闭
- worker.terminate
- self.close
- 以拷贝方式传递数据
- 创建
参考
Javascript高级编程
Web Worker