--- title: WindowTimers slug: conflicting/Web/API/WindowOrWorkerGlobalScope tags: - API - HTML DOM - Interface - Intervals - Mixin - NeedsTranslation - Reference - Timers - TopicStub - Workers translation_of: Web/API/WindowOrWorkerGlobalScope translation_of_original: Web/API/WindowTimers original_slug: Web/API/WindowTimers ---
{{APIRef("HTML DOM")}}

WindowTimers is a mixin used to provide utility methods which set and clear timers. No objects of this type exist; instead, its methods are available on {{domxref("Window")}} for the standard browsing scope, or on {{domxref("WorkerGlobalScope")}} for workers.

Properties

This interface neither inherits nor provides any properties.

Methods

This interface does not inherit any methods. It offers the following methods.

{{domxref("WindowTimers.clearInterval()")}}
Cancels the repeated execution set using {{domxref("WindowTimers.setInterval()")}}.
{{domxref("WindowTimers.clearTimeout()")}}
Cancels the delayed execution set using {{domxref("WindowTimers.setTimeout()")}}.
{{domxref("WindowTimers.setInterval()")}}
Schedules a function to execute every time a given number of milliseconds elapses.
{{domxref("WindowTimers.setTimeout()")}}
Schedules a function to execute in a given amount of time.

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