diff options
author | stephan <stephan@noemail.net> | 2022-08-22 13:34:13 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-08-22 13:34:13 +0000 |
commit | e3cd67603dc30d00e998bc9fb3183d49f43b830b (patch) | |
tree | 801653805886fe47c165b8f8ad83cf5b58cbbfc5 /ext/wasm/api/sqlite3-api-oo1.js | |
parent | 64d04a8d9fc15496ebab111972f4b3ae1578148a (diff) | |
download | sqlite-e3cd67603dc30d00e998bc9fb3183d49f43b830b.tar.gz sqlite-e3cd67603dc30d00e998bc9fb3183d49f43b830b.zip |
Refactor JS API amalgamation such that the bootstrapping/configuration is deferred until the whole amalgamation is available, to facilitate providing clients with a way to initialize the API with their own config (noting that we're still one small level of refactoring away from being able to actually do that).
FossilOrigin-Name: 9dbe9a6aecec43b51057375ef1d2d632db0d17eac8b7552c20cc91fc2f1a55d1
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 0e04b63eb..be9d8af5a 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -14,10 +14,9 @@ WASM build. It requires that sqlite3-api-glue.js has already run and it installs its deliverable as self.sqlite3.oo1. */ -(function(self){ +self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ const toss = (...args)=>{throw new Error(args.join(' '))}; - const sqlite3 = self.sqlite3 || toss("Missing main sqlite3 object."); const capi = sqlite3.capi, util = capi.util; /* What follows is colloquially known as "OO API #1". It is a binding of the sqlite3 API which is designed to be run within @@ -1547,5 +1546,6 @@ }, DB, Stmt - }/*SQLite3 object*/; -})(self); + }/*oo1 object*/; +}); + |