diff options
Diffstat (limited to 'ext/wasm/demo-kvvfs1.js')
-rw-r--r-- | ext/wasm/demo-kvvfs1.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ext/wasm/demo-kvvfs1.js b/ext/wasm/demo-kvvfs1.js index b358694ce..55a573df4 100644 --- a/ext/wasm/demo-kvvfs1.js +++ b/ext/wasm/demo-kvvfs1.js @@ -52,15 +52,10 @@ return; } - const dbStorage = 1 ? 'session' : 'local'; + const dbStorage = 0 ? 'session' : 'local'; const theStore = 's'===dbStorage[0] ? sessionStorage : localStorage; - /** - The names ':sessionStorage:' and ':localStorage:' are handled - via the DB class constructor, not the C level. In the C API, - the names "local" and "session" are the current (2022-09-12) - names for those keys, but that is subject to change. - */ - const db = new oo.DB( dbStorage, 'c', 'kvvfs' ); + const db = new oo.JsStorageDb( dbStorage ); + // Or: oo.DB(dbStorage, 'c', 'kvvfs') document.querySelector('#btn-clear-storage').addEventListener('click',function(){ const sz = capi.sqlite3_web_kvvfs_clear(); |