What's the best way to know if the running browser supports web-workers ?
is it
try { new Worker(); } catch (e) { /* it does not */ }
Thanks
What's the best way to know if the running browser supports web-workers ?
is it
try { new Worker(); } catch (e) { /* it does not */ }
Thanks
This is the code the script Modernizr uses:
tests[webWorkers] = function () {
return !!window.Worker;
};