v7.3.0
SupportExamplesFree Trial

Delayable
Mixin

Tracks setTimeout, setInterval and requestAnimationFrame calls and clears them on destroy.

someClass.setTimeout(() => console.log('hi'), 200);
someClass.setInterval(() => console.log('annoy'), 100);
// can also use named timeouts for easier tracking
someClass.setTimeout(() => console.log('named'), 300, 'named');
someClass.clearTimeout('named');

Useful functions

Function Description
setTimeout Schedule a callback, auto-cleared on destroy
setInterval Schedule a repeating callback, auto-cleared
requestAnimationFrame Schedule an animation frame callback
clearTimeout Cancel a previously scheduled timeout

See also

  • Events - Event handling mixin
No results

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isDelayable : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of Delayable class, or subclass thereof.

Functions

Functions are methods available for calling on the class

Type definitions

Source path

Core/mixin/Delayable.js

Contents