diff options
author | stephan <stephan@noemail.net> | 2022-09-18 17:32:35 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-09-18 17:32:35 +0000 |
commit | f38601206997aa909b2cd6dba02cb0b4e13e8e2a (patch) | |
tree | 7968c95b16ea078621e051c56bfd46b7e1197ce7 /ext/wasm/scratchpad-opfs-worker.js | |
parent | 0db3089576b6df43fa477100446ab330b5bda905 (diff) | |
download | sqlite-f38601206997aa909b2cd6dba02cb0b4e13e8e2a.tar.gz sqlite-f38601206997aa909b2cd6dba02cb0b4e13e8e2a.zip |
Numerous cleanups in the JS bits. Removed some now-defunct wasm test files. Expose sqlite3.opfs object containing various OPFS-specific utilities.
FossilOrigin-Name: 26e625d05d9820033b23536f18ad3ddc59ed712ad507d4b0c7fe88abd15d2be8
Diffstat (limited to 'ext/wasm/scratchpad-opfs-worker.js')
-rw-r--r-- | ext/wasm/scratchpad-opfs-worker.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/ext/wasm/scratchpad-opfs-worker.js b/ext/wasm/scratchpad-opfs-worker.js deleted file mode 100644 index e27164775..000000000 --- a/ext/wasm/scratchpad-opfs-worker.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - 2022-05-22 - - The author disclaims copyright to this source code. In place of a - legal notice, here is a blessing: - - * May you do good and not evil. - * May you find forgiveness for yourself and forgive others. - * May you share freely, never taking more than you give. - - *********************************************************************** - - A basic test script for sqlite3-api.js. This file must be run in - main JS thread. It will load sqlite3.js in a worker thread. -*/ -'use strict'; -(function(){ - const toss = function(...args){throw new Error(args.join(' '))}; - const eOutput = document.querySelector('#test-output'); - const logHtml = function(cssClass,...args){ - if(Array.isArray(args[0])) args = args[0]; - const ln = document.createElement('div'); - if(cssClass) ln.classList.add(cssClass); - ln.append(document.createTextNode(args.join(' '))); - eOutput.append(ln); - }; - const log = function(...args){ - logHtml('',...args); - }; - const error = function(...args){ - logHtml('error',...args); - }; - const warn = function(...args){ - logHtml('warning',...args); - }; - - const W = new Worker("scratchpad-opfs-worker2.js"); - W.onmessage = function(ev){ - ev = ev.data; - const d = ev.data; - switch(ev.type){ - case 'stdout': log(d); break; - case 'stderr': error(d); break; - default: warn("Unhandled message type:",ev); break; - } - }; -})(); |