web worker console.log [英] web worker console.log

查看:131
本文介绍了web worker console.log的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是只是我,还是 console.log()太多,要求从HTML5网络工作者?

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

我知道操作DOM被阻止,因为它是潜在的危险,但是真的有可能 console.log()可能被多线程工作者恶意利用?

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?

推荐答案

同意的东西会更好一些,但是不太难以破解一个原始的 console.log 使用 postMessage 。 David Flanagan有一个很好的包装器在这里

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.

这篇关于web worker console.log的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆