Skip to content

Commit 13a5c2d

Browse files
committed
Show the usage of MAIN_THREAD_EM_ASM() in documentation on MEMFS.
1 parent 16f8db4 commit 13a5c2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/source/docs/api_reference/Filesystem-API.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ File system API
312312
#include <emscripten.h>
313313
314314
int main() {
315-
EM_ASM(
315+
MAIN_THREAD_EM_ASM(
316316
FS.writeFile('file', 'foobar');
317317
FS.symlink('file', 'link');
318318
console.log(FS.readlink('link'));
@@ -341,7 +341,7 @@ File system API
341341
#include <emscripten.h>
342342
343343
int main() {
344-
EM_ASM(
344+
MAIN_THREAD_EM_ASM(
345345
FS.writeFile('file', 'foobar');
346346
console.log(FS.stat('file'));
347347
);
@@ -459,7 +459,7 @@ File system API
459459
#include <emscripten.h>
460460
461461
int main() {
462-
EM_ASM(
462+
MAIN_THREAD_EM_ASM(
463463
FS.writeFile('file', 'foobar');
464464
FS.truncate('file', 3);
465465
console.log(FS.readFile('file', { encoding: 'utf8' }));

0 commit comments

Comments
 (0)