diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-19 10:25:52 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-19 10:25:52 +0800 |
commit | 217a3c95a55b54573cda808abdeed7d406437a38 (patch) | |
tree | 4285054bce77fc5e61446745e31c4ba43bdf6cdd /pages | |
parent | e4fd03675034dbe97239228c660e6971446b9ee4 (diff) |
The main function is run first, it calls JS
which will later call WASM back.
Diffstat (limited to 'pages')
-rw-r--r-- | pages/index.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pages/index.c b/pages/index.c index 91d8471..fc165b6 100644 --- a/pages/index.c +++ b/pages/index.c @@ -33,3 +33,9 @@ void index_getproducts(const char *token, const char *app_url) sprintf(url, "%s%s", app_url, path); emscripten_fetch(&attr, url); } + +int main(int argc, char *argv[]) +{ + EM_ASM(getToken()); + return 0; +} |