You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* **`useWebWorker`**: Hook to use [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API), handling registration and communication.
6
+
* @param {UseWebWorkerProps} param - object
7
+
* @param {string|URL} [param.url] - A string representing the URL of the script the worker will execute. It must obey the same-origin policy.
8
+
* @param {WorkerOptions} [param.options] - An object containing option properties that can be set when creating the object instance.
9
+
* @param {(e: MessageEvent)=>void} [param.onMessage] - function that will be executed when a message occurred.
10
+
* @param {(e: MessageEvent)=>void} [param.onMessageError] - function that will be executed when a messageError occurred.
11
+
* @param {(e: Event)=>void} [param.onError] - function that will be executed when an error occurred.
12
+
* @returns {UseWebWorkerResult} result
13
+
* Object with these properties:
14
+
* - __send__: function to send a message to worker.
0 commit comments