1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Rename demo-oo1.* to demo-123.* and add demo-123-worker.html, which runs the same demo via a Worker. Doc typo fixes.

FossilOrigin-Name: 2e4a005bd35424caeaa99ace23162cf79e2ebdb159475ffad92b85dc864ad764
This commit is contained in:
stephan
2022-09-19 03:57:31 +00:00
parent ed85333977
commit ac51eb7754
9 changed files with 181 additions and 112 deletions

View File

@@ -326,13 +326,12 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
sqlite3.initWorker1API = function(){
'use strict';
const toss = (...args)=>{throw new Error(args.join(' '))};
if('function' !== typeof importScripts){
toss("Cannot initalize the sqlite3 worker API in the main thread.");
if(self.window === self || 'function' !== typeof importScripts){
toss("initWorker1API() must be run from a Worker thread.");
}
const self = this.self;
const sqlite3 = this.sqlite3 || toss("Missing this.sqlite3 object.");
const SQLite3 = sqlite3.oo1 || toss("Missing this.sqlite3.oo1 OO API.");
const DB = SQLite3.DB;
const DB = sqlite3.oo1.DB;
/**
Returns the app-wide unique ID for the given db, creating one if