diff --git a/indexedDb/channels/init.go b/indexedDb/channels/init.go index 586d9fdff4cdb32c9ad64797c68d3e6a8bca99f7..20f5108def2a3f88e200a1841036836d19d81e67 100644 --- a/indexedDb/channels/init.go +++ b/indexedDb/channels/init.go @@ -23,7 +23,7 @@ import ( // WorkerJavascriptFileURL is the URL of the script the worker will execute to // launch the worker WASM binary. It must obey the same-origin policy. -const WorkerJavascriptFileURL = "/integrations/assets/indexedDbWorker.js" +const WorkerJavascriptFileURL = "/integrations/assets/dmIndexedDbWorker.js" // MessageReceivedCallback is called any time a message is received or updated. // diff --git a/indexedDbWorker/channels/channelsIndexedDbWorker.js b/indexedDbWorker/channels/channelsIndexedDbWorker.js new file mode 100644 index 0000000000000000000000000000000000000000..7c03a409a1b5e62aab21a78dbffa7affa87b53b3 --- /dev/null +++ b/indexedDbWorker/channels/channelsIndexedDbWorker.js @@ -0,0 +1,16 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright © 2022 xx foundation // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file. // +//////////////////////////////////////////////////////////////////////////////// + +importScripts('wasm_exec.js'); + +const go = new Go(); +const binPath = 'xxdk-indexedDkWorker.wasm' +WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then((result) => { + go.run(result.instance); +}).catch((err) => { + console.error(err); +}); \ No newline at end of file diff --git a/indexedDbWorker/dm/dmIndexedDbWorker.js b/indexedDbWorker/dm/dmIndexedDbWorker.js new file mode 100644 index 0000000000000000000000000000000000000000..7c03a409a1b5e62aab21a78dbffa7affa87b53b3 --- /dev/null +++ b/indexedDbWorker/dm/dmIndexedDbWorker.js @@ -0,0 +1,16 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright © 2022 xx foundation // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file. // +//////////////////////////////////////////////////////////////////////////////// + +importScripts('wasm_exec.js'); + +const go = new Go(); +const binPath = 'xxdk-indexedDkWorker.wasm' +WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then((result) => { + go.run(result.instance); +}).catch((err) => { + console.error(err); +}); \ No newline at end of file