diff options
author | stephan <stephan@noemail.net> | 2022-10-30 09:47:33 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-30 09:47:33 +0000 |
commit | 1fc6ffccc55fc7105ce9426149e63446e062c01f (patch) | |
tree | ec2223831c80b6e521b3deb5aa28cbaf2762266f /ext/wasm/api/extern-post-js.js | |
parent | af9cee12c1e57bbd92db0ebdd2a4f9f551b1d790 (diff) | |
download | sqlite-1fc6ffccc55fc7105ce9426149e63446e062c01f.tar.gz sqlite-1fc6ffccc55fc7105ce9426149e63446e062c01f.zip |
Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output.
FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
Diffstat (limited to 'ext/wasm/api/extern-post-js.js')
-rw-r--r-- | ext/wasm/api/extern-post-js.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js index 67b32e891..84b99b53a 100644 --- a/ext/wasm/api/extern-post-js.js +++ b/ext/wasm/api/extern-post-js.js @@ -36,6 +36,11 @@ location: self.location, urlParams: new URL(self.location.href).searchParams }); + initModuleState.debugModule = + (new URL(self.location.href).searchParams).has('sqlite3.debugModule') + ? (...args)=>console.warn('sqlite3.debugModule:',...args) + : ()=>{}; + if(initModuleState.urlParams.has('sqlite3.dir')){ initModuleState.sqlite3Dir = initModuleState.urlParams.get('sqlite3.dir') +'/'; }else if(initModuleState.moduleScript){ @@ -43,7 +48,6 @@ li.pop(); initModuleState.sqlite3Dir = li.join('/') + '/'; } - //console.warn("initModuleState =",initModuleState); self.sqlite3InitModule = (...args)=>{ //console.warn("Using replaced sqlite3InitModule()",self.location); @@ -79,6 +83,7 @@ src.pop(); sim.scriptDir = src.join('/') + '/'; } + initModuleState.debugModule('sqlite3InitModuleState =',initModuleState); if(0){ console.warn("Replaced sqlite3InitModule()"); console.warn("self.location.href =",self.location.href); |