libcurl.load_wasm now returns a promise

This commit is contained in:
Allen Ding 2024-09-04 12:06:27 -07:00
parent 5bcff0228b
commit 15a6df827e
3 changed files with 51 additions and 10 deletions

20
client/use_bundled.html Normal file
View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="data:;base64,=">
<script src="./out/libcurl_full.js"></script>
<script>
async function main() {
console.log("libcurl.js ready?", libcurl.ready);
await libcurl.load_wasm();
console.log("libcurl.js ready?", libcurl.ready);
console.log("loaded libcurl.js", libcurl.version.lib);
}
main();
</script>
</head>
<body>
<p>emscripten tests</p>
</body>
</html>