diff options
author | stephan <stephan@noemail.net> | 2023-03-07 19:12:06 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-03-07 19:12:06 +0000 |
commit | 4214cc32ba2082b90dde97495058c45920235bf4 (patch) | |
tree | 1728d17a0729bdbd450e11bf0eecb4c02ca06691 /ext/wasm/api/sqlite3-api-oo1.js | |
parent | 7272f6d64d88da451f18aa515db06ed6f2b459d4 (diff) | |
download | sqlite-4214cc32ba2082b90dde97495058c45920235bf4.tar.gz sqlite-4214cc32ba2082b90dde97495058c45920235bf4.zip |
Replace use of 'self' in JS code with 'globalThis', as that works in browsers and node environments. Avoid using globalThis.location if it's not set (e.g. in node). Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235]. Minor JS build tweaks.
FossilOrigin-Name: dbbe8f25e58738c10b6192d41f1e3886983871f17631cbc45ce626d3f05a6e26
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 914497602..ac6678c88 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -12,9 +12,9 @@ This file contains the so-called OO #1 API wrapper for the sqlite3 WASM build. It requires that sqlite3-api-glue.js has already run - and it installs its deliverable as self.sqlite3.oo1. + and it installs its deliverable as globalThis.sqlite3.oo1. */ -self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ +globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ const toss = (...args)=>{throw new Error(args.join(' '))}; const toss3 = (...args)=>{throw new sqlite3.SQLite3Error(...args)}; |