Skip to content

Commit 99ebdb4

Browse files
committed
Updated readme with Web Worker browser support information (developit#14)
1 parent 4107e60 commit 99ebdb4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ console.log(await getName('developit'))
4848

4949
[🔄 **Run this example on JSFiddle**](https://jsfiddle.net/developit/mf9fbma5/)
5050

51+
## Browser support
52+
53+
Thankfully, Web Workers have been around for a while and [are broadly supported](https://caniuse.com/#feat=webworkers) by Chrome, Firefox, Safari, Edge, and Internet Explorer 10+.
54+
55+
If you still need to support older browsers, you can just check for the presence of `window.Worker`:
56+
57+
```js
58+
if (window.Worker) {
59+
...
60+
} else {
61+
...
62+
}
63+
```
64+
65+
5166
## License & Credits
5267

5368
> In addition to the contributors, credit goes to [@sgb-io](https://github.com/sgb-io) for his annotated exploration of Greenlet's source. This prompted a refactor that clarified the code and allowed for further size optimizations.

0 commit comments

Comments
 (0)