emscripten/site
Ingvar Stepanyan e77e71cdbe
Add EM_ASYNC_JS macro (#14728)
Adds an easy way to declare asynchronous JS functions. With this helper, users can use await directly inside of such snippets, don't need to wrap every such function into Asyncify.handleAsync manually, don't need to deal with propagating return values, and, finally, don't need to manually list all such functions in ASYNCIFY_IMPORTS since we know statically they're asynchronous.

I've also updated docs to merge "returning values" section into the first example, since it's now straightforward with EM_ASYNC_JS, a bit more involved but still easy with EM_JS + Asyncify.handleAsync, and only Asyncify.handleSleep API requires more explanation.

Fixes #9709.
2021-07-26 13:48:53 -07:00
..
source Add EM_ASYNC_JS macro (#14728) 2021-07-26 13:48:53 -07:00
.gitignore
Makefile Require sphinx-build 2.4.4 to build site (#14224) 2021-05-21 08:17:38 -07:00
make.bat