aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/extern-post-js.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-11-19 02:51:41 +0000
committerstephan <stephan@noemail.net>2022-11-19 02:51:41 +0000
commitf7d98ac7649f6b0ad5cd0597e02e0fd96df437dc (patch)
tree8f7302fc4ee6e60c3a82f5fee7a70f20773060d2 /ext/wasm/api/extern-post-js.js
parentee026c54794b3196326dc5b1db1c9a714bc84e18 (diff)
downloadsqlite-f7d98ac7649f6b0ad5cd0597e02e0fd96df437dc.tar.gz
sqlite-f7d98ac7649f6b0ad5cd0597e02e0fd96df437dc.zip
More work towards creation of a ES6 JS module.
FossilOrigin-Name: 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42
Diffstat (limited to 'ext/wasm/api/extern-post-js.js')
-rw-r--r--ext/wasm/api/extern-post-js.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js
index d933a3626..fe9e4392b 100644
--- a/ext/wasm/api/extern-post-js.js
+++ b/ext/wasm/api/extern-post-js.js
@@ -4,6 +4,9 @@
most of the associated JS code, runs outside of the
Emscripten-generated module init scope, in the current
global scope. */
+//#if SQLITE_JS_ESM
+const toexport =
+//#endif
(function(){
/**
In order to hide the sqlite3InitModule()'s resulting Emscripten
@@ -103,4 +106,10 @@
exports["sqlite3InitModule"] = sqlite3InitModule;
/* AMD modules get injected in a way we cannot override,
so we can't handle those here. */
+//#if SQLITE_JS_ESM
+ return self.sqlite3InitModule;
+//#endif
})();
+//#if SQLITE_JS_ESM
+export default toexport;
+//#endif