Web Workers: How do I know if a browser supports it?

What is the best way to find out if a webmaster supports a working browser?

this

try { new Worker(); } catch (e) { /* it does not */ }

thank

+3
source share
1 answer

This is the Modernizr script code uses:

tests[webWorkers] = function () {
    return !!window.Worker;
};
+6
source

Source: https://habr.com/ru/post/1764149/


All Articles