本文介紹了網絡工作者控制臺.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?
推薦答案
約定好的事情會好很多,但是使用 postMessage 破解原始的
console.log
并不難代碼>.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.
這篇關于網絡工作者控制臺.log的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!