aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/extern-post-js.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-03-09 22:09:13 +0000
committerstephan <stephan@noemail.net>2023-03-09 22:09:13 +0000
commit434205a2c152516b3363ca6ca1542415e72be88c (patch)
tree966e95ac87d8d4754a1a0a16af773338aea4a1b8 /ext/wasm/api/extern-post-js.c-pp.js
parentbad7d5041a2bb71f3d3776ef153e472cf9975ce6 (diff)
downloadsqlite-434205a2c152516b3363ca6ca1542415e72be88c.tar.gz
sqlite-434205a2c152516b3363ca6ca1542415e72be88c.zip
Replace a lingering use of 'self' with 'globalThis' in JS code, for node compatibility.
FossilOrigin-Name: 7e3782b5aa07621db95c2dc25b25ae21da988c9876d537b78ea289a83c75b06b
Diffstat (limited to 'ext/wasm/api/extern-post-js.c-pp.js')
-rw-r--r--ext/wasm/api/extern-post-js.c-pp.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/wasm/api/extern-post-js.c-pp.js b/ext/wasm/api/extern-post-js.c-pp.js
index 14d434991..927bf64f9 100644
--- a/ext/wasm/api/extern-post-js.c-pp.js
+++ b/ext/wasm/api/extern-post-js.c-pp.js
@@ -42,7 +42,7 @@ const toExportForESM =
is called.
*/
const initModuleState = globalThis.sqlite3InitModuleState = Object.assign(Object.create(null),{
- moduleScript: self?.document?.currentScript,
+ moduleScript: globalThis?.document?.currentScript,
isWorker: ('undefined' !== typeof WorkerGlobalScope),
location: globalThis.location,
urlParams: globalThis?.location?.href
@@ -63,7 +63,7 @@ const toExportForESM =
}
globalThis.sqlite3InitModule = function ff(...args){
- //console.warn("Using replaced sqlite3InitModule()",self.location);
+ //console.warn("Using replaced sqlite3InitModule()",globalThis.location);
return originalInit(...args).then((EmscriptenModule)=>{
if('undefined'!==typeof WorkerGlobalScope &&
(EmscriptenModule['ENVIRONMENT_IS_PTHREAD']