关于Web Worker的一些心得(二)

来源:互联网 发布:非结构化数据分析方法 编辑:程序博客网 时间:2024/06/09 16:30

1.postMessage(message)向创建线程的原窗口发送消息

2.Onmessage只接收数据,不能在里面直接写方法,只能调用外面的方法

3.线程.js 无法访问window,docment等对象,不可写输出语句(console.debug()),不支持Extjs等方法(除非引入js)

4.火狐不支持共享线程SharedWorker

5.importScripts(url)导入其他js文件

XMLHttpRequest在线程中处理ajax请求

'QueryCanlendarDataAction.do?project_id='+event.data 这种传递参数的方法只能传递少量的数据

xhr.send(Data) 通过这个方法才能传递大数据参数

0 0