diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-19 09:02:02 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-19 09:02:02 +0800 |
commit | f6032cd02992dc35dcf4bc67a6fbe83eb78ad39e (patch) | |
tree | e581454e37cf9b257c590f94a592776ba7beebd2 /index.html | |
parent | a7b4ce7e5a00927bf833efb84cca45e0bb94a7cc (diff) |
HTML is to be filled with app URL, API key & host
JS then calls WASM, which in this example, tries to get products.
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -8,7 +8,16 @@ <body> <script src="https://unpkg.com/@shopify/app-bridge@3"></script> <script src="https://unpkg.com/@shopify/app-bridge-utils@3"></script> - <script async type="text/javascript" src="js/authenticatedFetch.js"></script> - <script async type="text/javascript" src="js/index.js"></script> + <script async type="text/javascript" src="%s/js/index.js"></script> + <script async> + Module.cwrap('index_getproducts', '', + ['string', 'string'])(await + window['app-bridge-utils'] + .getSessionToken(window['app-bridge'] + .createApp({ + apiKey: '%s', + host: '%s' + })), '%s'); + </script> </body> </html> |