aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/demo-123.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-29 22:08:22 +0000
committerstephan <stephan@noemail.net>2022-09-29 22:08:22 +0000
commitf71c954cbc07fa0fc8a59e2a8a5a2a32b8e5d95c (patch)
tree44ceac4d12ee7e382ed6d3c8124fa66996617720 /ext/wasm/demo-123.js
parentb0ccf50cbd0430eefaf50f5b6c2485ee8d68d6d4 (diff)
downloadsqlite-f71c954cbc07fa0fc8a59e2a8a5a2a32b8e5d95c.tar.gz
sqlite-f71c954cbc07fa0fc8a59e2a8a5a2a32b8e5d95c.zip
Add JS infrastructure to ostensibly allow us to customize the wasm imports, which will hypothetically allow us to eliminate the dependency on EM_JS(), but the corresponding Emscripten glue-level feature currently breaks fatally with WASMFS builds so it's disabled.
FossilOrigin-Name: 88d9253b0db5494bf1c9b6d24f22524eeec856b89e64a66ffb30d945f0df21d3
Diffstat (limited to 'ext/wasm/demo-123.js')
-rw-r--r--ext/wasm/demo-123.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/wasm/demo-123.js b/ext/wasm/demo-123.js
index 00ea1f5bc..37dc7a7af 100644
--- a/ext/wasm/demo-123.js
+++ b/ext/wasm/demo-123.js
@@ -21,6 +21,7 @@
*/
let logHtml;
if(self.window === self /* UI thread */){
+ console.log("Running demo from main UI thread.");
logHtml = function(cssClass,...args){
const ln = document.createElement('div');
if(cssClass) ln.classList.add(cssClass);
@@ -28,6 +29,7 @@
document.body.append(ln);
};
}else{ /* Worker thread */
+ console.log("Running demo from Worker thread.");
logHtml = function(cssClass,...args){
postMessage({
type:'log',