Baseline Widely available
Note: This feature is available in Web Workers, except for Service Workers.
The terminate()
method of the Worker
interface immediately terminates the Worker
. This does not offer the worker an opportunity to finish its operations; it is stopped at once.
None.
Return valueNone (undefined
).
The following code snippet shows creation of a Worker
object using the Worker()
constructor, which is then immediately terminated.
const myWorker = new Worker("worker.js");
myWorker.terminate();
Note: DedicatedWorkers and SharedWorkers can also be stopped from the Worker
instance using the DedicatedWorkerGlobalScope.close()
or SharedWorkerGlobalScope.close()
methods.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3