scala.scalajs.js.timers
Non-Standard Non-standard, but in general well supported methods to schedule asynchronous execution.
The methods in this package work in all JavaScript virtual machines
supporting setTimeout
and setInterval
.
Type members
Classlikes
Value members
Concrete methods
Cancel an interval execution
Cancel an interval execution
- Value parameters:
- handle
The handle returned by setInterval.
- Note:
Uses JavaScript's non-standard
clearInterval
Cancel a timeout execution
Cancel a timeout execution
- Value parameters:
- handle
The handle returned by setTimeout.
- Note:
Uses JavaScript's non-standard
clearTimeout
Schedule something for repeated execution every interval
milliseconds.
Schedule something for repeated execution every interval
milliseconds.
- Value parameters:
- body
code to execute after each
interval
- interval
duration in milliseconds between executions
- Returns:
A handle that can be used to cancel the interval by passing it to clearInterval.
- Note:
Uses JavaScript's non-standard
setInterval
Schedule something for repeated execution every duration.
Schedule something for repeated execution every duration.
- Value parameters:
- body
code to execute after each
interval
- interval
duration between executions
- Returns:
A handle that can be used to cancel the interval by passing it to clearInterval.
- Note:
Uses JavaScript's non-standard
setInterval
Schedule something for execution in interval
milliseconds.
Schedule something for execution in interval
milliseconds.
- Value parameters:
- body
code to execute after
interval
has passed- interval
duration in milliseconds to wait
- Returns:
A handle that can be used to cancel the timeout by passing it to clearTimeout.
- Note:
Uses JavaScript's non-standard
setTimeout
Schedule something for execution after a duration.
Schedule something for execution after a duration.
- Value parameters:
- body
code to execute after
interval
has passed- interval
duration to wait
- Returns:
A handle that can be used to cancel the timeout by passing it to clearTimeout.
- Note:
Uses JavaScript's non-standard
setTimeout