gossamer
Types
Values
pub fn clear_interval(id: Int) -> Nil
pub fn clear_timeout(id: Int) -> Nil
Cancels a scheduled action initiated by set_timeout.
pub fn fetch(url: String) -> promise.Promise(response.Response)
Fetch a resource from the network. It returns a Promise that resolves to
the Response to that Request, whether it is successful or not.
pub fn fetch_request(
request: request.Request,
) -> promise.Promise(response.Response)
Fetch a resource from the network using a Request object.
pub fn fetch_with_init(
url: String,
init: List(request_init.RequestInit),
) -> promise.Promise(response.Response)
Fetch a resource from the network with options.
pub fn prompt(
message: String,
default: String,
) -> option.Option(String)
pub fn queue_microtask(func: fn() -> Nil) -> Nil
A microtask is a short function which is executed after the function or module which created it exits and only if the JavaScript execution stack is empty, but before returning control to the event loop being used to drive the script’s execution environment.
pub fn report_error(error: e) -> Nil
pub fn set_interval(delay: Int, callback: fn() -> Nil) -> Int
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.