aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/sqlite3-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-27 13:40:12 +0000
committerstephan <stephan@noemail.net>2022-09-27 13:40:12 +0000
commit5b9973d89849c318b0500de1fa0019181e7bd3c0 (patch)
treef6f34298ed88a7fd6a8c6d80f49c4aaae29b73ee /ext/wasm/sqlite3-worker1.js
parent3d64548491f6e95854b843f978a4ada16eff614c (diff)
downloadsqlite-5b9973d89849c318b0500de1fa0019181e7bd3c0.tar.gz
sqlite-5b9973d89849c318b0500de1fa0019181e7bd3c0.zip
WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.
FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
Diffstat (limited to 'ext/wasm/sqlite3-worker1.js')
-rw-r--r--ext/wasm/sqlite3-worker1.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/wasm/sqlite3-worker1.js b/ext/wasm/sqlite3-worker1.js
index ff024d821..6de8facf9 100644
--- a/ext/wasm/sqlite3-worker1.js
+++ b/ext/wasm/sqlite3-worker1.js
@@ -28,4 +28,9 @@
*/
"use strict";
importScripts('sqlite3.js');
-sqlite3InitModule().then((EmscriptenModule)=>EmscriptenModule.sqlite3.initWorker1API());
+sqlite3InitModule().then((EmscriptenModule)=>{
+ EmscriptenModule.sqlite3.asyncPostInit().then((sqlite3)=>{
+ sqlite3.capi.sqlite3_wasmfs_opfs_dir();
+ sqlite3.initWorker1API();
+ });
+});