--- title: WindowTimers slug: Web/API/WindowTimers tags: - API - HTML DOM translation_of: Web/API/WindowOrWorkerGlobalScope translation_of_original: Web/API/WindowTimers ---
{{APIRef("HTML DOM")}}

WindowTimers contains utility methods to set and clear timers.

There is no object of this type, though the context object, either the {{domxref("Window")}} for regular browsing scope, or the {{domxref("WorkerGlobalScope")}}  for workers, implements it.

Properties

This interface do not define any property, nor inherit any.

Methods

This interface do not inherit any method.

{{domxref("WindowTimers.clearInterval()")}}
Cancels the repeated execution set using {{domxref("WindowTimers.setInterval()")}}.
{{domxref("WindowTimers.clearTimeout()")}}
Cancels the repeated execution set using {{domxref("WindowTimers.setTimeout()")}}.
{{domxref("WindowTimers.setInterval()")}}
Schedules the execution of a function each X milliseconds.
{{domxref("WindowTimers.setTimeout()")}}
Sets a delay for executing a function.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', '#windowtimers', 'WindowTimers')}} {{Spec2('HTML WHATWG')}} No change since the latest snapshot, {{SpecName("HTML5.1")}}.
{{SpecName('HTML5.1', '#windowtimers', 'WindowTimers')}} {{Spec2('HTML5.1')}} Snapshot of {{SpecName("HTML WHATWG")}}. No change.
{{SpecName("HTML5 W3C", "#windowtimers", "WindowTimers")}} {{Spec2('HTML5 W3C')}} Snapshot of {{SpecName("HTML WHATWG")}}. Creation of WindowBase64 (properties where on the target before it).

Browser compatibility

{{CompatibilityTable}}

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support {{CompatGeckoDesktop(1)}} 1.0 4.0 4.0 1.0
Feature Firefox Mobile (Gecko) Android IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatGeckoMobile(1)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

 

See also