Skip to content

Commit d799979

Browse files
authored
Merge branch 'master' into master
2 parents f37ac4d + f714faf commit d799979

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,26 @@ console.log(await getName('developit'))
4848

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

51+
5152
## Transferable ready
5253

5354
Greenlet will even accept and optimize [transferables](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) as arguments to and from a greenlet worker function.
5455

56+
57+
## Browser support
58+
59+
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+.
60+
61+
If you still need to support older browsers, you can just check for the presence of `window.Worker`:
62+
63+
```js
64+
if (window.Worker) {
65+
...
66+
} else {
67+
...
68+
}
69+
```
70+
5571
## License & Credits
5672

5773
> 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)