We are creating a javascript client app that uses web workers. We will only run on browsers that support web workers.
What version of ECMAScript can we assume those browsers support? Do they all support version 5?
Web Workers were pulled out of the ECMAScript 5 standard. Instead, they are currently defined in an editors draft, which is not linked to a specific version of ECMAScript.
Basically, you can't assume a particular version.
If typeof window.Worker === 'function'
, you can assume the browser has some Web Worker support; but be aware of the perils of working with them.
caniuse.com shows the following level of support for Web Workers (at the time of writing...):
But again, I strongly recommend you feature detect rather than browser sniff.
Even if Web Workers were linked to a specific ECMAScript version, a browser never really conforms to a particular version as you might think. A browser might fully support one ECMASCript 5 feature, partially support another, have buggy support in another, whilst not support another at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With