GlobalThis
The globalThis global object.
Methods
setTimeout()
setTimeout(
callback,
delay, ...
args?): number
Sets a timer which executes a function or specified piece of code once the timer expires. Also see setTimeout.
Parameters
Parameter | Type | Description |
---|---|---|
| (... | A function to be executed after the timer expires. |
|
| The milliseconds that the timer should wait before the function is executed. |
... |
| Additional arguments which are passed through to the function. |
Returns
number
The ID (integer) which identifies the timer created.
Throws
Error if callback is not a function value.
clearTimeout()
clearTimeout(id): void
Cancels a timeout previously established by calling setTimeout.
Parameters
Parameter | Type | Description |
---|---|---|
|
| The ID (integer) which identifies the timer. |
Returns
void
Throws
Error if ID is not an integer value.