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-
Identifies an object as an instance of Delayable class, or subclass thereof.
-
Identifies an object as an instance of Delayable class, or subclass thereof.