Module Js.GlobalSource

Contains functions available in the global scope (window in a browser context)

Sourcetype intervalId

Identify an interval started by setInterval

Sourcetype timeoutId

Identify timeout started by setTimeout

Sourceval clearInterval : intervalId -> unit
Sourceval clearTimeout : timeoutId -> unit
Sourceval setInterval : f:(unit -> unit) -> int -> intervalId
Sourceval setIntervalFloat : f:(unit -> unit) -> float -> intervalId
Sourceval setTimeout : f:(unit -> unit) -> int -> timeoutId
Sourceval setTimeoutFloat : f:(unit -> unit) -> float -> timeoutId
Sourceval encodeURI : string -> string
Sourceval decodeURI : string -> string
Sourceval encodeURIComponent : string -> string
Sourceval decodeURIComponent : string -> string
Sourceval parseFloat : string -> float

Parses a string and returns a floating point number. Returns NaN if parsing fails.

Sourceval parseInt : ?radix:int -> string -> float

Parses a string and returns an integer. Returns NaN if parsing fails.

  • parameter radix

    The base (2-36) to use for parsing. Default is 10.