sig
external encodeURIComponent : string -> string = "@encodeURIComponent"
external decodeURIComponent : string -> string = "@decodeURIComponent"
external dump : string -> unit = "@dump"
external eval : string -> 'a = "@eval"
val typeof : 'a -> string
val true_ : bool
val false_ : bool
class type ['a] js_array =
object
method _get_length : int
method _set_length : int -> unit
method join : string -> string
method pop : 'a
method push : 'a -> int
method reverse : unit
method shift : 'a
method slice : int -> int -> 'a Javascript.js_array
method sort : 'a Javascript.js_array
method sort_compare_ : ('a -> 'a -> int) -> 'a Javascript.js_array
method toLocaleString : string
method toString : string
method unshift : 'a -> int
end
external new_Array : unit -> 'a Javascript.js_array = "$new" "Array"
external new_Array_length : int -> 'a Javascript.js_array = "$new" "Array"
class type date =
object
method getDate : int
method getFullYear : int
method getHours : int
method getMinutes : int
method getMonth : int
method getTime : float
method setDate : int -> unit
method setHours : int -> unit
method setMinutes : int -> unit
method setMonth : int -> unit
method toDateString : string
method toLocaleString : string
method toString : string
end
val new_Date : unit -> Javascript.date
external new_Date_milliseconds : float -> Javascript.date = "$new" "Date"
external new_Date_parts :
int -> int -> int -> int -> int -> int -> int -> Javascript.date = "$new"
"Date"
class type regexp =
object
method exec : string -> string array
method test : string -> bool
end
external new_RegExp : string -> Javascript.regexp = "$new" "RegExp"
external new_RegExp_attributes : string -> string -> Javascript.regexp
= "$new" "RegExp"
class type js_string =
object
method indexOf : string -> int
method match_ : Javascript.regexp -> string array
method replace : Javascript.regexp -> string -> string
method split : string -> string array
end
external js_string_of_string : string -> Javascript.js_string = "%identity"
module Js_string :
sig
external fromCharCode : int -> string = "@String.fromCharCode"
external match_ : string -> Javascript.regexp -> string array
= "#match"
external split : string -> string -> string array = "#split"
external indexOf : string -> string -> int = "#indexOf"
external replace : string -> Javascript.regexp -> string -> string
= "#replace"
end
module Math : sig val pi : float end
end