files/en-us/web/api/workerglobalscope/cleartimeout/index.md
{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The clearTimeout() method of the {{domxref("WorkerGlobalScope")}} interface cancels a timeout previously established by calling {{domxref("WorkerGlobalScope.setTimeout()")}}.
If the parameter provided does not identify a previously established action, this method does nothing.
clearTimeout(timeoutID)
timeoutID
setTimeout().It's worth noting that the pool of IDs used by {{domxref("WorkerGlobalScope.setTimeout", "setTimeout()")}} and {{domxref("WorkerGlobalScope.setInterval", "setInterval()")}} are shared, which means you can technically use clearTimeout() and {{domxref("WorkerGlobalScope.clearInterval", "clearInterval()")}} interchangeably. However, for clarity, you should avoid doing so.
None ({{jsxref("undefined")}}).
See {{domxref("Window.clearTimeout()")}} for examples.
Passing an invalid ID to clearTimeout() silently does nothing; no
exception is thrown.
{{Specifications}}
{{Compat}}