了解正在运行的浏览器是否支持 web-workers 的最佳方法是什么?
是吗
try { new Worker(); } catch (e) { /* it does not */ }
谢谢
最佳答案
这是脚本代码 Modernizr用途:
tests[webWorkers] = function () {
return !!window.Worker;
};
关于javascript - 网络 worker : how to know if the browser supports it?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3684777/