gossamer

Types

pub type Date

Values

pub fn alert(message: String) -> Nil
pub fn clear_interval(id: Int) -> Nil
pub fn clear_timeout(id: Int) -> Nil
pub fn close() -> Nil
pub fn confirm(message: String) -> Bool
pub fn fetch(
  url: String,
) -> promise.Promise(Result(response.Response, String))
pub fn fetch_request(
  request: request.Request,
) -> promise.Promise(Result(response.Response, String))
pub fn fetch_with_init(
  url: String,
  init: List(request_init.RequestInit),
) -> promise.Promise(Result(response.Response, String))
pub fn prompt(
  message: String,
  default: String,
) -> Result(String, Nil)
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.

Search Document