plinth/browser/window

Types

pub type RequestID
pub type WakeLockSentinal
pub type Window

Functions

pub fn add_event_listener(
  type_: String,
  listener: fn(Event) -> Nil,
) -> Nil
pub fn alert(a: String) -> Nil
pub fn cancel_animation_frame(request_id: RequestID) -> Nil
pub fn close(window: Window) -> Bool
pub fn closed(window: Window) -> Bool
pub fn eval(source: String) -> Result(Dynamic, String)
pub fn get_hash() -> Result(String, Nil)
pub fn get_search() -> Result(String, Nil)
pub fn inner_height(window: Window) -> Int
pub fn inner_width(window: Window) -> Int
pub fn location() -> String
pub fn location_of(window: Window) -> String
pub fn open(
  url: String,
  name: String,
  features: String,
) -> Result(Window, String)
pub fn outer_height(window: Window) -> Int
pub fn outer_width(window: Window) -> Int
pub fn reload() -> Nil
pub fn request_animation_frame(
  callback: fn() -> Nil,
) -> RequestID
pub fn request_wake_lock() -> Promise(
  Result(WakeLockSentinal, Nil),
)
pub fn self() -> Window
Search Document