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

More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.

FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
This commit is contained in:
stephan
2023-01-27 03:18:16 +00:00
parent 67bfea4ea6
commit a0013fbe87
8 changed files with 53 additions and 24 deletions

View File

@ -100,13 +100,20 @@ const installOpfsVfs = function callee(options){
if(!options || 'object'!==typeof options){
options = Object.create(null);
}
const urlParams = new URL(self.location.href).searchParams;
if(undefined===options.verbose){
options.verbose = urlParams.has('opfs-verbose')
? (+urlParams.get('opfs-verbose') || 2) : 1;
}
if(undefined===options.sanityChecks){
options.sanityChecks = urlParams.has('opfs-sanity-check');
const urlParams =
//#if target=es6-bundler-friendly
undefined;
//#else
new URL(self.location.href).searchParams;
//#endif
if(urlParams){
if(undefined===options.verbose){
options.verbose = urlParams.has('opfs-verbose')
? (+urlParams.get('opfs-verbose') || 2) : 1;
}
if(undefined===options.sanityChecks){
options.sanityChecks = urlParams.has('opfs-sanity-check');
}
}
if(undefined===options.proxyUri){
options.proxyUri = callee.defaultProxyUri;