aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-worker1-promiser.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-01-28 04:20:46 +0000
committerstephan <stephan@noemail.net>2023-01-28 04:20:46 +0000
commit65f7942d0678a56f788d54a636c9c30ed63b5ee6 (patch)
treed3d7ad55512c95b9ca137d605d7e0b760f8bf687 /ext/wasm/api/sqlite3-worker1-promiser.js
parentcfd01014d0b5657a8b48d4c828405703cce9e941 (diff)
parent69141f52be6368d3510b551c74029e3600b6f4c2 (diff)
downloadsqlite-65f7942d0678a56f788d54a636c9c30ed63b5ee6.tar.gz
sqlite-65f7942d0678a56f788d54a636c9c30ed63b5ee6.zip
Add JS bundler-friendly JS build. Minor test code cleanups.
FossilOrigin-Name: 24d3a53dea5e596230558e233cbbd9d0288b4c394cd5ea7b650fd99bff4cde2e
Diffstat (limited to 'ext/wasm/api/sqlite3-worker1-promiser.js')
-rw-r--r--ext/wasm/api/sqlite3-worker1-promiser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-worker1-promiser.js b/ext/wasm/api/sqlite3-worker1-promiser.js
index 7360512d4..1689d3480 100644
--- a/ext/wasm/api/sqlite3-worker1-promiser.js
+++ b/ext/wasm/api/sqlite3-worker1-promiser.js
@@ -238,6 +238,9 @@ self.sqlite3Worker1Promiser = function callee(config = callee.defaultConfig){
}/*sqlite3Worker1Promiser()*/;
self.sqlite3Worker1Promiser.defaultConfig = {
worker: function(){
+//#if target=es6-bundler-friendly
+ return new Worker("sqlite3-worker1.js");
+//#else
let theJs = "sqlite3-worker1.js";
if(this.currentScript){
const src = this.currentScript.src.split('/');
@@ -252,6 +255,7 @@ self.sqlite3Worker1Promiser.defaultConfig = {
}
}
return new Worker(theJs + self.location.search);
+//#endif
}.bind({
currentScript: self?.document?.currentScript
}),