amber/web
Types
pub type AbortSignal
pub type ReadableStream(r)
pub type WritableStream(w)
Functions
pub fn clear_timeout(id: Int) -> Nil
Cancels a scheduled action initiated by set_timeout
.
Examples
let id = web.set_timeout(500, fn() { io.println("hello") })
// ...
web.clear_timeout(id)
pub fn set_timeout(delay: Int, callback: fn() -> Nil) -> Int
Sets a timer which executes a function once after the delay (in milliseconds) elapses. Returns an id which may be used to cancel the timeout.
Examples
web.set_timeout(500, fn() { io.println("hello") })