gbr/js/jscore

Core javascript module

Manage globalThis instance

Types

pub type Global =
  Object
pub type Object

A long integer value, the request ID, that uniquely identifies the entry in the callback list. This is a non-zero value, but you may not make any other assumptions about its value. You can pass this value to window.cancelAnimationFrame() to cancel the refresh callback request.

pub type RequestID
pub type TimerID

https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel

pub type WakeLockSentinel
pub type Window =
  Object

Values

pub fn get_object_inner_key(
  in: Object,
  inner: String,
  property: String,
) -> option.Option(a)
pub fn get_object_key(
  in: Object,
  property: String,
) -> option.Option(a)
pub fn global() -> Object
pub fn is_browser() -> Bool
pub fn is_edge() -> Bool
pub fn is_firefox() -> Bool
pub fn is_ie() -> Bool
pub fn new_object() -> Object
pub fn try(
  cb: fn(a) -> b,
  prefix_error: String,
) -> Result(option.Option(b), String)
pub fn try_async(
  cb: fn(a) -> b,
  prefix_error: String,
) -> promise.Promise(Result(option.Option(b), String))
pub fn try_execute(
  app: a,
  cb: fn(b) -> c,
  req: b,
) -> Result(c, String)
pub fn try_execute_async(
  app: a,
  cb: fn(b) -> c,
  req: b,
) -> promise.Promise(Result(c, String))
Search Document