mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add capability to override the JS's use of console.log/debug/warn/error() with client-provided versions via the bootstrap-time config object.
FossilOrigin-Name: c54f29d8e55419eaa9168e799dab5030e89063b13d8390a50616606422d164dc
This commit is contained in:
@@ -2972,6 +2972,14 @@ self.sqlite3InitModule = sqlite3InitModule;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
log("Loading and initializing sqlite3 WASM module...");
|
||||
if(0){
|
||||
self.sqlite3ApiConfig = {
|
||||
debug: ()=>{},
|
||||
log: ()=>{},
|
||||
warn: ()=>{},
|
||||
error: ()=>{}
|
||||
}
|
||||
}
|
||||
if(!self.sqlite3InitModule && !isUIThread()){
|
||||
/* Vanilla worker, as opposed to an ES6 module worker */
|
||||
/*
|
||||
@@ -3004,7 +3012,7 @@ self.sqlite3InitModule = sqlite3InitModule;
|
||||
}).then(function(sqlite3){
|
||||
//console.log('sqlite3 =',sqlite3);
|
||||
log("Done initializing WASM/JS bits. Running tests...");
|
||||
console.warn("Installing sqlite3 bits as global S for local dev/test purposes.");
|
||||
sqlite3.config.warn("Installing sqlite3 bits as global S for local dev/test purposes.");
|
||||
self.S = sqlite3;
|
||||
capi = sqlite3.capi;
|
||||
wasm = sqlite3.wasm;
|
||||
|
Reference in New Issue
Block a user