* Creates an interval that will be tracked under the specified context. * @param contextId - The context identifier to group this timer under. * @param handler - The function to execute repeatedly. * @param timeout - The delay in milliseconds between executions (default: 0). * @param args -
(contextId: string, handler: TimerHandler, timeout?: number, ...args: any[])
| 80 | * @public |
| 81 | */ |
| 82 | setInterval(contextId: string, handler: TimerHandler, timeout?: number, ...args: any[]): number { |
| 83 | const id = window.setInterval(handler, timeout, args) |
| 84 | const current = this.intervals.get(contextId) ?? [] |
| 85 | this.intervals.set(contextId, [...current, id]) |
| 86 | return id |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Requests an animation frame that will be tracked under the specified context. |
no test coverage detected