1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

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
This commit is contained in:
stephan
2022-09-29 22:08:22 +00:00
parent b0ccf50cbd
commit f71c954cbc
11 changed files with 123 additions and 36 deletions

View File

@ -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',