diff --git a/indexedDb/messageHandler.go b/indexedDb/messageHandler.go index aae293acb4ef1c163a8e23f78d52daa07c33e93f..3c74eed9611e32824c1b14743e107bcaab6e8887 100644 --- a/indexedDb/messageHandler.go +++ b/indexedDb/messageHandler.go @@ -166,17 +166,3 @@ func (mh *MessageHandler) addEventListeners() { func (mh *MessageHandler) postMessage(aMessage any) { js.Global().Call("postMessage", aMessage) } - -// postMessageTransferList sends an array of Transferable objects to transfer to -// the main thread. This is meant to be used to transfer large amounts of binary -// data using a high-performance, zero-copy operation. Refer to the doc for more -// information. -// -// Note: The binary data cannot simply be passed as the transferList. The -// traversable objects must be specified in the aMessage and included in the -// transferList -// -// Doc: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage -func (mh *MessageHandler) postMessageTransferList(aMessage, transferList any) { - js.Global().Call("postMessage", aMessage, transferList) -} diff --git a/indexedDbWorker/worker.go b/indexedDbWorker/worker.go index 6151f79995d263741be2bd76670f1a85aabaab4e..99a948d80c1360253cb33d470fcec2c1aaca5d12 100644 --- a/indexedDbWorker/worker.go +++ b/indexedDbWorker/worker.go @@ -21,10 +21,9 @@ import ( // TODO: // 1. Fix ID counter -// 2. Use transfer list when sending -// 3. Get path to JS file from bindings -// 4. restructure packages -// 5. fix tag system +// 2. Get path to JS file from bindings +// 3. restructure packages +// 4. fix tag system // InitID is the ID for the first item in the handler list. If the list only // contains one handler, then this is the ID of that handler. If the list has @@ -267,20 +266,6 @@ func (wh *WorkerHandler) postMessage(msg any) { wh.worker.Call("postMessage", msg) } -// postMessageTransferList sends an array of Transferable objects to transfer to -// the worker. This is meant to be used to transfer large amounts of binary data -// using a high-performance, zero-copy operation. Refer to the doc for more -// information. -// -// Note: The binary data cannot simply be passed as the transferList. The -// traversable objects must be specified in the aMessage and included in the -// transferList -// -// Doc: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage#transfer -func (wh *WorkerHandler) postMessageTransferList(msg, transferList any) { - wh.worker.Call("postMessage", msg, transferList) -} - // newWorkerOptions creates a new Javascript object containing optional // properties that can be set when creating a new worker. //