diff --git a/.ocamlformat b/.ocamlformat index 3eb12ecaf6..7c0fbb754e 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -10,5 +10,5 @@ break-separators=before dock-collection-brackets=false margin=90 module-item-spacing=sparse -version=0.25.1 +version = 0.26.0 ocaml-version=4.08.0 diff --git a/compiler/lib/base64.ml b/compiler/lib/base64.ml index 0928c3aa3a..5757bef9bb 100644 --- a/compiler/lib/base64.ml +++ b/compiler/lib/base64.ml @@ -39,7 +39,7 @@ let unsafe_get_uint8 t off = Char.code (String.unsafe_get t off) let unsafe_set_uint8 t off v = Bytes.unsafe_set t off (Char.chr v) external unsafe_set_uint16 : bytes -> int -> int -> unit = "%caml_bytes_set16u" - [@@noalloc] +[@@noalloc] external unsafe_get_uint16 : string -> int -> int = "%caml_string_get16u" [@@noalloc] diff --git a/compiler/lib/dgraph.ml b/compiler/lib/dgraph.ml index 6834620095..d09ea4f823 100644 --- a/compiler/lib/dgraph.ml +++ b/compiler/lib/dgraph.ml @@ -19,11 +19,12 @@ *) open! Stdlib -module Make (N : sig - type t -end) -(NSet : Set.S with type elt = N.t) -(NMap : Map.S with type key = N.t) = +module Make + (N : sig + type t + end) + (NSet : Set.S with type elt = N.t) + (NMap : Map.S with type key = N.t) = struct type t = { domain : NSet.t @@ -175,11 +176,12 @@ module type Tbl = sig val make : size -> 'a -> 'a t end -module Make_Imperative (N : sig - type t -end) -(NSet : ISet with type elt = N.t) -(NTbl : Tbl with type key = N.t) = +module Make_Imperative + (N : sig + type t + end) + (NSet : ISet with type elt = N.t) + (NTbl : Tbl with type key = N.t) = struct type t = { domain : NSet.t diff --git a/compiler/lib/dgraph.mli b/compiler/lib/dgraph.mli index 337569f3ae..406eca92cb 100644 --- a/compiler/lib/dgraph.mli +++ b/compiler/lib/dgraph.mli @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -module Make (N : sig - type t -end) -(NSet : Set.S with type elt = N.t) -(NMap : Map.S with type key = N.t) : sig +module Make + (N : sig + type t + end) + (NSet : Set.S with type elt = N.t) + (NMap : Map.S with type key = N.t) : sig type t = { domain : NSet.t ; fold_children : 'a. (N.t -> 'a -> 'a) -> N.t -> 'a -> 'a @@ -72,11 +73,12 @@ module type Tbl = sig val make : size -> 'a -> 'a t end -module Make_Imperative (N : sig - type t -end) -(NSet : ISet with type elt = N.t) -(NTbl : Tbl with type key = N.t) : sig +module Make_Imperative + (N : sig + type t + end) + (NSet : ISet with type elt = N.t) + (NTbl : Tbl with type key = N.t) : sig type t = { domain : NSet.t ; iter_children : (N.t -> unit) -> N.t -> unit diff --git a/compiler/lib/js_output.ml b/compiler/lib/js_output.ml index f724f093ec..1a54bfd96a 100644 --- a/compiler/lib/js_output.ml +++ b/compiler/lib/js_output.ml @@ -856,35 +856,35 @@ struct | CoverInitializedName (e, _, _) -> early_error e and method_ : 'a. _ -> (PP.t -> 'a -> unit) -> 'a -> method_ -> unit = - fun (type a) f (name : PP.t -> a -> unit) (n : a) (m : method_) -> - match m with - | MethodGet (k, l, b, loc') | MethodSet (k, l, b, loc') -> - (match k with - | { async = false; generator = false } -> () - | _ -> assert false); - let prefix = - match m with - | MethodGet _ -> "get" - | MethodSet _ -> "set" - | _ -> assert false - in - function_declaration f prefix name (Some n) l b loc' - | Method (k, l, b, loc') -> - let fpn f () = - (match k with - | { async = false; generator = false } -> () - | { async = false; generator = true } -> - PP.string f "*"; - PP.space f - | { async = true; generator = false } -> - PP.string f "async"; - PP.space f - | { async = true; generator = true } -> - PP.string f "async*"; - PP.space f); - name f n - in - function_declaration f "" fpn (Some ()) l b loc' + fun (type a) f (name : PP.t -> a -> unit) (n : a) (m : method_) -> + match m with + | MethodGet (k, l, b, loc') | MethodSet (k, l, b, loc') -> + (match k with + | { async = false; generator = false } -> () + | _ -> assert false); + let prefix = + match m with + | MethodGet _ -> "get" + | MethodSet _ -> "set" + | _ -> assert false + in + function_declaration f prefix name (Some n) l b loc' + | Method (k, l, b, loc') -> + let fpn f () = + (match k with + | { async = false; generator = false } -> () + | { async = false; generator = true } -> + PP.string f "*"; + PP.space f + | { async = true; generator = false } -> + PP.string f "async"; + PP.space f + | { async = true; generator = true } -> + PP.string f "async*"; + PP.space f); + name f n + in + function_declaration f "" fpn (Some ()) l b loc' and element_list f el = comma_list f element el diff --git a/compiler/lib/js_traverse.ml b/compiler/lib/js_traverse.ml index aea8e01557..41efb1a781 100644 --- a/compiler/lib/js_traverse.ml +++ b/compiler/lib/js_traverse.ml @@ -20,57 +20,56 @@ open! Stdlib open Javascript -class type mapper = - object - method loc : Javascript.location -> Javascript.location +class type mapper = object + method loc : Javascript.location -> Javascript.location - method expression : Javascript.expression -> Javascript.expression + method expression : Javascript.expression -> Javascript.expression - method expression_o : Javascript.expression option -> Javascript.expression option + method expression_o : Javascript.expression option -> Javascript.expression option - method switch_case : Javascript.expression -> Javascript.expression + method switch_case : Javascript.expression -> Javascript.expression - method block : Javascript.statement_list -> Javascript.statement_list + method block : Javascript.statement_list -> Javascript.statement_list - method fun_decl : Javascript.function_declaration -> Javascript.function_declaration + method fun_decl : Javascript.function_declaration -> Javascript.function_declaration - method class_decl : Javascript.class_declaration -> Javascript.class_declaration + method class_decl : Javascript.class_declaration -> Javascript.class_declaration - method initialiser : - Javascript.expression * Javascript.location - -> Javascript.expression * Javascript.location + method initialiser : + Javascript.expression * Javascript.location + -> Javascript.expression * Javascript.location - method initialiser_o : - (Javascript.expression * Javascript.location) option - -> (Javascript.expression * Javascript.location) option + method initialiser_o : + (Javascript.expression * Javascript.location) option + -> (Javascript.expression * Javascript.location) option - method for_binding : - Javascript.variable_declaration_kind - -> Javascript.for_binding - -> Javascript.for_binding + method for_binding : + Javascript.variable_declaration_kind + -> Javascript.for_binding + -> Javascript.for_binding - method variable_declaration : - Javascript.variable_declaration_kind - -> Javascript.variable_declaration - -> Javascript.variable_declaration + method variable_declaration : + Javascript.variable_declaration_kind + -> Javascript.variable_declaration + -> Javascript.variable_declaration - method statement : Javascript.statement -> Javascript.statement + method statement : Javascript.statement -> Javascript.statement - method statement_o : - (Javascript.statement * Javascript.location) option - -> (Javascript.statement * Javascript.location) option + method statement_o : + (Javascript.statement * Javascript.location) option + -> (Javascript.statement * Javascript.location) option - method statements : Javascript.statement_list -> Javascript.statement_list + method statements : Javascript.statement_list -> Javascript.statement_list - method formal_parameter_list : - Javascript.formal_parameter_list -> Javascript.formal_parameter_list + method formal_parameter_list : + Javascript.formal_parameter_list -> Javascript.formal_parameter_list - method ident : Javascript.ident -> Javascript.ident + method ident : Javascript.ident -> Javascript.ident - method program : Javascript.program -> Javascript.program + method program : Javascript.program -> Javascript.program - method function_body : statement_list -> statement_list - end + method function_body : statement_list -> statement_list +end (* generic js ast walk/map *) class map : mapper = @@ -303,42 +302,41 @@ class map : mapper = method function_body x = m#statements x end -class type iterator = - object - method fun_decl : Javascript.function_declaration -> unit +class type iterator = object + method fun_decl : Javascript.function_declaration -> unit - method early_error : Javascript.early_error -> unit + method early_error : Javascript.early_error -> unit - method expression : Javascript.expression -> unit + method expression : Javascript.expression -> unit - method expression_o : Javascript.expression option -> unit + method expression_o : Javascript.expression option -> unit - method switch_case : Javascript.expression -> unit + method switch_case : Javascript.expression -> unit - method block : Javascript.statement_list -> unit + method block : Javascript.statement_list -> unit - method initialiser : Javascript.expression * Javascript.location -> unit + method initialiser : Javascript.expression * Javascript.location -> unit - method initialiser_o : (Javascript.expression * Javascript.location) option -> unit + method initialiser_o : (Javascript.expression * Javascript.location) option -> unit - method for_binding : - Javascript.variable_declaration_kind -> Javascript.for_binding -> unit + method for_binding : + Javascript.variable_declaration_kind -> Javascript.for_binding -> unit - method variable_declaration : - Javascript.variable_declaration_kind -> Javascript.variable_declaration -> unit + method variable_declaration : + Javascript.variable_declaration_kind -> Javascript.variable_declaration -> unit - method statement : Javascript.statement -> unit + method statement : Javascript.statement -> unit - method statement_o : (Javascript.statement * Javascript.location) option -> unit + method statement_o : (Javascript.statement * Javascript.location) option -> unit - method statements : Javascript.statement_list -> unit + method statements : Javascript.statement_list -> unit - method ident : Javascript.ident -> unit + method ident : Javascript.ident -> unit - method program : Javascript.program -> unit + method program : Javascript.program -> unit - method function_body : Javascript.statement_list -> unit - end + method function_body : Javascript.statement_list -> unit +end (* generic js ast iterator *) class iter : iterator = @@ -717,32 +715,31 @@ type block = | Params of formal_parameter_list | Normal -class type freevar = - object ('a) - inherit mapper +class type freevar = object ('a) + inherit mapper - method merge_info : 'a -> unit + method merge_info : 'a -> unit - method merge_block_info : 'a -> unit + method merge_block_info : 'a -> unit - method record_block : block -> unit + method record_block : block -> unit - method state : t + method state : t - method def_var : Javascript.ident -> unit + method def_var : Javascript.ident -> unit - method def_local : Javascript.ident -> unit + method def_local : Javascript.ident -> unit - method use_var : Javascript.ident -> unit + method use_var : Javascript.ident -> unit - method get_count : int Javascript.IdentMap.t + method get_count : int Javascript.IdentMap.t - method get_free : IdentSet.t + method get_free : IdentSet.t - method get_def : IdentSet.t + method get_def : IdentSet.t - method get_use : IdentSet.t - end + method get_use : IdentSet.t +end class free = object (m : 'test) diff --git a/compiler/lib/js_traverse.mli b/compiler/lib/js_traverse.mli index 855449b7e7..ba625bab20 100644 --- a/compiler/lib/js_traverse.mli +++ b/compiler/lib/js_traverse.mli @@ -19,99 +19,94 @@ open! Stdlib open Javascript -class type mapper = - object - method loc : Javascript.location -> Javascript.location +class type mapper = object + method loc : Javascript.location -> Javascript.location - method expression : expression -> expression + method expression : expression -> expression - method expression_o : expression option -> expression option + method expression_o : expression option -> expression option - method switch_case : expression -> expression + method switch_case : expression -> expression - method block : Javascript.statement_list -> Javascript.statement_list + method block : Javascript.statement_list -> Javascript.statement_list - method fun_decl : Javascript.function_declaration -> Javascript.function_declaration + method fun_decl : Javascript.function_declaration -> Javascript.function_declaration - method class_decl : Javascript.class_declaration -> Javascript.class_declaration + method class_decl : Javascript.class_declaration -> Javascript.class_declaration - method initialiser : expression * location -> expression * location + method initialiser : expression * location -> expression * location - method initialiser_o : - (expression * location) option -> (expression * location) option + method initialiser_o : (expression * location) option -> (expression * location) option - method for_binding : - Javascript.variable_declaration_kind - -> Javascript.for_binding - -> Javascript.for_binding + method for_binding : + Javascript.variable_declaration_kind + -> Javascript.for_binding + -> Javascript.for_binding - method variable_declaration : - Javascript.variable_declaration_kind - -> Javascript.variable_declaration - -> Javascript.variable_declaration + method variable_declaration : + Javascript.variable_declaration_kind + -> Javascript.variable_declaration + -> Javascript.variable_declaration - method statement : statement -> statement + method statement : statement -> statement - method statements : statement_list -> statement_list + method statements : statement_list -> statement_list - method statement_o : (statement * location) option -> (statement * location) option + method statement_o : (statement * location) option -> (statement * location) option - method ident : ident -> ident + method ident : ident -> ident - method formal_parameter_list : - Javascript.formal_parameter_list -> Javascript.formal_parameter_list + method formal_parameter_list : + Javascript.formal_parameter_list -> Javascript.formal_parameter_list - method program : program -> program + method program : program -> program - method function_body : statement_list -> statement_list - end + method function_body : statement_list -> statement_list +end -class type iterator = - object - method fun_decl : Javascript.function_declaration -> unit +class type iterator = object + method fun_decl : Javascript.function_declaration -> unit - method early_error : Javascript.early_error -> unit + method early_error : Javascript.early_error -> unit - method expression : Javascript.expression -> unit + method expression : Javascript.expression -> unit - method expression_o : Javascript.expression option -> unit + method expression_o : Javascript.expression option -> unit - method switch_case : Javascript.expression -> unit + method switch_case : Javascript.expression -> unit - method block : Javascript.statement_list -> unit + method block : Javascript.statement_list -> unit - method initialiser : Javascript.expression * Javascript.location -> unit + method initialiser : Javascript.expression * Javascript.location -> unit - method initialiser_o : (Javascript.expression * Javascript.location) option -> unit + method initialiser_o : (Javascript.expression * Javascript.location) option -> unit - method for_binding : - Javascript.variable_declaration_kind -> Javascript.for_binding -> unit + method for_binding : + Javascript.variable_declaration_kind -> Javascript.for_binding -> unit - method variable_declaration : - Javascript.variable_declaration_kind -> Javascript.variable_declaration -> unit + method variable_declaration : + Javascript.variable_declaration_kind -> Javascript.variable_declaration -> unit - method statement : Javascript.statement -> unit + method statement : Javascript.statement -> unit - method statement_o : (Javascript.statement * Javascript.location) option -> unit + method statement_o : (Javascript.statement * Javascript.location) option -> unit - method statements : Javascript.statement_list -> unit + method statements : Javascript.statement_list -> unit - method ident : Javascript.ident -> unit + method ident : Javascript.ident -> unit - method program : Javascript.program -> unit + method program : Javascript.program -> unit - method function_body : Javascript.statement_list -> unit - end + method function_body : Javascript.statement_list -> unit +end class map : mapper class iter : iterator -class subst : - (ident -> ident) - -> object - inherit mapper - end +class subst : (ident -> ident) -> object + inherit mapper +end type t = { use : IdentSet.t @@ -124,32 +119,31 @@ type block = | Params of formal_parameter_list | Normal -class type freevar = - object ('a) - inherit mapper +class type freevar = object ('a) + inherit mapper - method merge_info : 'a -> unit + method merge_info : 'a -> unit - method merge_block_info : 'a -> unit + method merge_block_info : 'a -> unit - method record_block : block -> unit + method record_block : block -> unit - method def_var : ident -> unit + method def_var : ident -> unit - method def_local : Javascript.ident -> unit + method def_local : Javascript.ident -> unit - method use_var : ident -> unit + method use_var : ident -> unit - method state : t + method state : t - method get_count : int IdentMap.t + method get_count : int IdentMap.t - method get_free : IdentSet.t + method get_free : IdentSet.t - method get_def : IdentSet.t + method get_def : IdentSet.t - method get_use : IdentSet.t - end + method get_use : IdentSet.t +end class free : freevar @@ -157,12 +151,11 @@ class rename_variable : mapper class share_constant : mapper -class compact_vardecl : - object ('a) - inherit free +class compact_vardecl : object ('a) + inherit free - method exc : IdentSet.t - end + method exc : IdentSet.t +end class clean : mapper diff --git a/compiler/lib/ocaml_compiler.ml b/compiler/lib/ocaml_compiler.ml index 054a592e6c..d90da05b9d 100644 --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml @@ -172,16 +172,16 @@ module Symtable = struct [@@if ocaml_version >= (5, 2, 0)] let reloc_get_of_string name = Cmo_format.Reloc_getglobal (Ident.create_persistent name) - [@@if ocaml_version < (5, 2, 0)] + [@@if ocaml_version < (5, 2, 0)] let reloc_set_of_string name = Cmo_format.Reloc_setglobal (Ident.create_persistent name) - [@@if ocaml_version < (5, 2, 0)] + [@@if ocaml_version < (5, 2, 0)] let reloc_get_of_string name = Cmo_format.Reloc_getcompunit (Compunit name) - [@@if ocaml_version >= (5, 2, 0)] + [@@if ocaml_version >= (5, 2, 0)] let reloc_set_of_string name = Cmo_format.Reloc_setcompunit (Compunit name) - [@@if ocaml_version >= (5, 2, 0)] + [@@if ocaml_version >= (5, 2, 0)] let reloc_ident name = let buf = Bytes.create 4 in @@ -207,13 +207,13 @@ module Cmo_format = struct let name (t : t) = let (Compunit name) = t.cu_name in name - [@@if ocaml_version >= (5, 2, 0)] + [@@if ocaml_version >= (5, 2, 0)] let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals - [@@if ocaml_version < (5, 2, 0)] + [@@if ocaml_version < (5, 2, 0)] let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) - [@@if ocaml_version >= (5, 2, 0)] + [@@if ocaml_version >= (5, 2, 0)] let primitives (t : t) = t.cu_primitives diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index 80a5f12de4..e042ea86f6 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -2787,7 +2787,7 @@ module Reloc = struct } let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] + [@@if ocaml_version < (5, 1, 0)] let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] diff --git a/examples/hyperbolic/hypertree.ml b/examples/hyperbolic/hypertree.ml index 8afd26443b..6f7b9d9b0b 100644 --- a/examples/hyperbolic/hypertree.ml +++ b/examples/hyperbolic/hypertree.ml @@ -103,49 +103,47 @@ let outside_color = Js.string (*"#0c1a0d"*) "#070718" let option var = Js.Optdef.get var (fun () -> Js.Unsafe.coerce (new%js Js.array_empty)) -class type style = - object - method border : float Js.optdef Js.readonly_prop +class type style = object + method border : float Js.optdef Js.readonly_prop - method padding : float Js.optdef Js.readonly_prop + method padding : float Js.optdef Js.readonly_prop - method backgroundColor : Js.js_string Js.t Js.optdef Js.readonly_prop + method backgroundColor : Js.js_string Js.t Js.optdef Js.readonly_prop - method boundaryColor : Js.js_string Js.t Js.optdef Js.readonly_prop + method boundaryColor : Js.js_string Js.t Js.optdef Js.readonly_prop - method treeColor : Js.js_string Js.t Js.optdef Js.readonly_prop + method treeColor : Js.js_string Js.t Js.optdef Js.readonly_prop - method nodeColor : Js.js_string Js.t Js.optdef Js.readonly_prop + method nodeColor : Js.js_string Js.t Js.optdef Js.readonly_prop - method nodeBackgroundColor : Js.js_string Js.t Js.optdef Js.readonly_prop + method nodeBackgroundColor : Js.js_string Js.t Js.optdef Js.readonly_prop - method nodeFont : Js.js_string Js.t Js.optdef Js.readonly_prop + method nodeFont : Js.js_string Js.t Js.optdef Js.readonly_prop - method buttonColor : Js.js_string Js.t Js.optdef Js.readonly_prop - end + method buttonColor : Js.js_string Js.t Js.optdef Js.readonly_prop +end let style : style Js.t = option Js.Unsafe.global##.hyp_style_ -class type messages = - object - method info : Js.js_string Js.t Js.optdef Js.readonly_prop +class type messages = object + method info : Js.js_string Js.t Js.optdef Js.readonly_prop - method recenter : Js.js_string Js.t Js.optdef Js.readonly_prop + method recenter : Js.js_string Js.t Js.optdef Js.readonly_prop - method noRef : Js.js_string Js.t Js.optdef Js.readonly_prop + method noRef : Js.js_string Js.t Js.optdef Js.readonly_prop - method close : Js.js_string Js.t Js.optdef Js.readonly_prop + method close : Js.js_string Js.t Js.optdef Js.readonly_prop - method wikimediaCommons : Js.js_string Js.t Js.optdef Js.readonly_prop + method wikimediaCommons : Js.js_string Js.t Js.optdef Js.readonly_prop - method language : Js.js_string Js.t Js.optdef Js.readonly_prop + method language : Js.js_string Js.t Js.optdef Js.readonly_prop - method noRef : Js.js_string Js.t Js.optdef Js.readonly_prop + method noRef : Js.js_string Js.t Js.optdef Js.readonly_prop - method languages : Js.js_string Js.t Js.optdef Js.readonly_prop + method languages : Js.js_string Js.t Js.optdef Js.readonly_prop - method ok : Js.js_string Js.t Js.optdef Js.readonly_prop - end + method ok : Js.js_string Js.t Js.optdef Js.readonly_prop +end let opt_style v default = Js.Optdef.get v (fun () -> default) diff --git a/lib/js_of_ocaml/dom.ml b/lib/js_of_ocaml/dom.ml index 47bf5b3abd..8d77d0c8e6 100644 --- a/lib/js_of_ocaml/dom.ml +++ b/lib/js_of_ocaml/dom.ml @@ -21,12 +21,11 @@ open Js open! Import -class type ['node] nodeList = - object - method item : int -> 'node t opt meth +class type ['node] nodeList = object + method item : int -> 'node t opt meth - method length : int readonly_prop - end + method length : int readonly_prop +end let list_of_nodeList (nodeList : 'a nodeList t) = let length = nodeList##.length in @@ -80,46 +79,45 @@ module DocumentPosition = struct let ( + ) = add end -class type node = - object - method nodeName : js_string t readonly_prop +class type node = object + method nodeName : js_string t readonly_prop - method nodeValue : js_string t opt readonly_prop + method nodeValue : js_string t opt readonly_prop - method nodeType : nodeType readonly_prop + method nodeType : nodeType readonly_prop - method parentNode : node t opt prop + method parentNode : node t opt prop - method childNodes : node nodeList t prop + method childNodes : node nodeList t prop - method firstChild : node t opt prop + method firstChild : node t opt prop - method lastChild : node t opt prop + method lastChild : node t opt prop - method previousSibling : node t opt prop + method previousSibling : node t opt prop - method nextSibling : node t opt prop + method nextSibling : node t opt prop - method namespaceURI : js_string t opt prop + method namespaceURI : js_string t opt prop - method insertBefore : node t -> node t opt -> node t meth + method insertBefore : node t -> node t opt -> node t meth - method replaceChild : node t -> node t -> node t meth + method replaceChild : node t -> node t -> node t meth - method removeChild : node t -> node t meth + method removeChild : node t -> node t meth - method appendChild : node t -> node t meth + method appendChild : node t -> node t meth - method hasChildNodes : bool t meth + method hasChildNodes : bool t meth - method cloneNode : bool t -> node t meth + method cloneNode : bool t -> node t meth - method compareDocumentPosition : node t -> DocumentPosition.t meth + method compareDocumentPosition : node t -> DocumentPosition.t meth - method lookupNamespaceURI : js_string t -> js_string t opt meth + method lookupNamespaceURI : js_string t -> js_string t opt meth - method lookupPrefix : js_string t -> js_string t opt meth - end + method lookupPrefix : js_string t -> js_string t opt meth +end let appendChild (p : #node t) (n : #node t) = ignore (p##appendChild (n :> node t)) @@ -132,89 +130,85 @@ let insertBefore (p : #node t) (n : #node t) (o : #node t opt) = ignore (p##insertBefore (n :> node t) (o :> node t opt)) (** Specification of [Attr] objects. *) -class type attr = - object - inherit node +class type attr = object + inherit node - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method specified : bool t readonly_prop + method specified : bool t readonly_prop - method value : js_string t prop + method value : js_string t prop - method ownerElement : element t prop - end + method ownerElement : element t prop +end (** Specification of [NamedNodeMap] objects. *) -and ['node] namedNodeMap = - object - method getNamedItem : js_string t -> 'node t opt meth +and ['node] namedNodeMap = object + method getNamedItem : js_string t -> 'node t opt meth - method setNamedItem : 'node t -> 'node t opt meth + method setNamedItem : 'node t -> 'node t opt meth - method removeNamedItem : js_string t -> 'node t opt meth + method removeNamedItem : js_string t -> 'node t opt meth - method item : int -> 'node t opt meth + method item : int -> 'node t opt meth - method length : int readonly_prop - end + method length : int readonly_prop +end (** Specification of [Element] objects. *) -and element = - object - inherit node +and element = object + inherit node - method tagName : js_string t readonly_prop + method tagName : js_string t readonly_prop - method getAttribute : js_string t -> js_string t opt meth + method getAttribute : js_string t -> js_string t opt meth - method setAttribute : js_string t -> js_string t -> unit meth + method setAttribute : js_string t -> js_string t -> unit meth - method removeAttribute : js_string t -> unit meth + method removeAttribute : js_string t -> unit meth - method hasAttribute : js_string t -> bool t meth + method hasAttribute : js_string t -> bool t meth - method getAttributeNS : js_string t -> js_string t -> js_string t opt meth + method getAttributeNS : js_string t -> js_string t -> js_string t opt meth - method setAttributeNS : js_string t -> js_string t -> js_string t -> unit meth + method setAttributeNS : js_string t -> js_string t -> js_string t -> unit meth - method removeAttributeNS : js_string t -> js_string t -> unit meth + method removeAttributeNS : js_string t -> js_string t -> unit meth - method hasAttributeNS : js_string t -> js_string t -> bool t meth + method hasAttributeNS : js_string t -> js_string t -> bool t meth - method getAttributeNode : js_string t -> attr t opt meth + method getAttributeNode : js_string t -> attr t opt meth - method setAttributeNode : attr t -> attr t opt meth + method setAttributeNode : attr t -> attr t opt meth - method removeAttributeNode : attr t -> attr t meth + method removeAttributeNode : attr t -> attr t meth - method getAttributeNodeNS : js_string t -> js_string t -> attr t opt meth + method getAttributeNodeNS : js_string t -> js_string t -> attr t opt meth - method setAttributeNodeNS : attr t -> attr t opt meth + method setAttributeNodeNS : attr t -> attr t opt meth - method getElementsByTagName : js_string t -> element nodeList t meth + method getElementsByTagName : js_string t -> element nodeList t meth - method attributes : attr namedNodeMap t readonly_prop - end + method attributes : attr namedNodeMap t readonly_prop +end -class type characterData = - object - inherit node +class type characterData = object + inherit node - method data : js_string t prop + method data : js_string t prop - method length : int readonly_prop + method length : int readonly_prop - method subjs_stringData : int -> int -> js_string t meth + method subjs_stringData : int -> int -> js_string t meth - method appendData : js_string t -> unit meth + method appendData : js_string t -> unit meth - method insertData : int -> js_string t -> unit meth + method insertData : int -> js_string t -> unit meth - method deleteData : int -> int -> unit meth + method deleteData : int -> int -> unit meth - method replaceData : int -> int -> js_string t -> unit meth - end + method replaceData : int -> int -> js_string t -> unit meth +end class type comment = characterData @@ -222,32 +216,31 @@ class type text = characterData class type documentFragment = node -class type ['element] document = - object - inherit node +class type ['element] document = object + inherit node - method documentElement : 'element t readonly_prop + method documentElement : 'element t readonly_prop - method createDocumentFragment : documentFragment t meth + method createDocumentFragment : documentFragment t meth - method createElement : js_string t -> 'element t meth + method createElement : js_string t -> 'element t meth - method createElementNS : js_string t -> js_string t -> 'element t meth + method createElementNS : js_string t -> js_string t -> 'element t meth - method createTextNode : js_string t -> text t meth + method createTextNode : js_string t -> text t meth - method createAttribute : js_string t -> attr t meth + method createAttribute : js_string t -> attr t meth - method createComment : js_string t -> comment t meth + method createComment : js_string t -> comment t meth - method getElementById : js_string t -> 'element t opt meth + method getElementById : js_string t -> 'element t opt meth - method getElementsByTagName : js_string t -> 'element nodeList t meth + method getElementsByTagName : js_string t -> 'element nodeList t meth - method importNode : element t -> bool t -> 'element t meth + method importNode : element t -> bool t -> 'element t meth - method adoptNode : element t -> 'element t meth - end + method adoptNode : element t -> 'element t meth +end type node_type = | Element of element t @@ -281,24 +274,22 @@ type ('a, 'b) event_listener = ('a, 'b -> bool t) meth_callback opt ['a] is the type of the target object; the second parameter ['b] is the type of the event object. *) -class type ['a] event = - object - method _type : js_string t readonly_prop +class type ['a] event = object + method _type : js_string t readonly_prop - method target : 'a t opt readonly_prop + method target : 'a t opt readonly_prop - method currentTarget : 'a t opt readonly_prop + method currentTarget : 'a t opt readonly_prop - (* Legacy methods *) - method srcElement : 'a t opt readonly_prop - end + (* Legacy methods *) + method srcElement : 'a t opt readonly_prop +end -class type ['a, 'b] customEvent = - object - inherit ['a] event +class type ['a, 'b] customEvent = object + inherit ['a] event - method detail : 'b Js.opt Js.readonly_prop - end + method detail : 'b Js.opt Js.readonly_prop +end let no_handler : ('a, 'b) event_listener = Js.null @@ -360,14 +351,13 @@ end type event_listener_id = unit -> unit -class type event_listener_options = - object - method capture : bool t writeonly_prop +class type event_listener_options = object + method capture : bool t writeonly_prop - method once : bool t writeonly_prop + method once : bool t writeonly_prop - method passive : bool t writeonly_prop - end + method passive : bool t writeonly_prop +end let addEventListenerWithOptions (e : (< .. > as 'a) t) typ ?capture ?once ?passive h = if (Js.Unsafe.coerce e)##.addEventListener == Js.undefined @@ -419,11 +409,10 @@ let createCustomEvent ?bubbles ?cancelable ?detail typ = (* IE < 9 *) -class type stringList = - object - method item : int -> js_string t opt meth +class type stringList = object + method item : int -> js_string t opt meth - method length : int readonly_prop + method length : int readonly_prop - method contains : js_string t -> bool t meth - end + method contains : js_string t -> bool t meth +end diff --git a/lib/js_of_ocaml/dom.mli b/lib/js_of_ocaml/dom.mli index 9e066e64a2..da1180817c 100644 --- a/lib/js_of_ocaml/dom.mli +++ b/lib/js_of_ocaml/dom.mli @@ -28,12 +28,11 @@ open Js (** {2 DOM objects} *) (** Specification of [NodeList] objects. *) -class type ['node] nodeList = - object - method item : int -> 'node t opt meth +class type ['node] nodeList = object + method item : int -> 'node t opt meth - method length : int readonly_prop - end + method length : int readonly_prop +end type nodeType = | OTHER @@ -76,132 +75,127 @@ module DocumentPosition : sig end (** Specification of [Node] objects. *) -class type node = - object - method nodeName : js_string t readonly_prop +class type node = object + method nodeName : js_string t readonly_prop - method nodeValue : js_string t opt readonly_prop + method nodeValue : js_string t opt readonly_prop - method nodeType : nodeType readonly_prop + method nodeType : nodeType readonly_prop - method parentNode : node t opt prop + method parentNode : node t opt prop - method childNodes : node nodeList t prop + method childNodes : node nodeList t prop - method firstChild : node t opt prop + method firstChild : node t opt prop - method lastChild : node t opt prop + method lastChild : node t opt prop - method previousSibling : node t opt prop + method previousSibling : node t opt prop - method nextSibling : node t opt prop + method nextSibling : node t opt prop - method namespaceURI : js_string t opt prop + method namespaceURI : js_string t opt prop - method insertBefore : node t -> node t opt -> node t meth + method insertBefore : node t -> node t opt -> node t meth - method replaceChild : node t -> node t -> node t meth + method replaceChild : node t -> node t -> node t meth - method removeChild : node t -> node t meth + method removeChild : node t -> node t meth - method appendChild : node t -> node t meth + method appendChild : node t -> node t meth - method hasChildNodes : bool t meth + method hasChildNodes : bool t meth - method cloneNode : bool t -> node t meth + method cloneNode : bool t -> node t meth - method compareDocumentPosition : node t -> DocumentPosition.t meth + method compareDocumentPosition : node t -> DocumentPosition.t meth - method lookupNamespaceURI : js_string t -> js_string t opt meth + method lookupNamespaceURI : js_string t -> js_string t opt meth - method lookupPrefix : js_string t -> js_string t opt meth - end + method lookupPrefix : js_string t -> js_string t opt meth +end (** Specification of [Attr] objects. *) -class type attr = - object - inherit node +class type attr = object + inherit node - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method specified : bool t readonly_prop + method specified : bool t readonly_prop - method value : js_string t prop + method value : js_string t prop - method ownerElement : element t prop - end + method ownerElement : element t prop +end (** Specification of [NamedNodeMap] objects. *) -and ['node] namedNodeMap = - object - method getNamedItem : js_string t -> 'node t opt meth +and ['node] namedNodeMap = object + method getNamedItem : js_string t -> 'node t opt meth - method setNamedItem : 'node t -> 'node t opt meth + method setNamedItem : 'node t -> 'node t opt meth - method removeNamedItem : js_string t -> 'node t opt meth + method removeNamedItem : js_string t -> 'node t opt meth - method item : int -> 'node t opt meth + method item : int -> 'node t opt meth - method length : int readonly_prop - end + method length : int readonly_prop +end (** Specification of [Element] objects. *) -and element = - object - inherit node +and element = object + inherit node - method tagName : js_string t readonly_prop + method tagName : js_string t readonly_prop - method getAttribute : js_string t -> js_string t opt meth + method getAttribute : js_string t -> js_string t opt meth - method setAttribute : js_string t -> js_string t -> unit meth + method setAttribute : js_string t -> js_string t -> unit meth - method removeAttribute : js_string t -> unit meth + method removeAttribute : js_string t -> unit meth - method hasAttribute : js_string t -> bool t meth + method hasAttribute : js_string t -> bool t meth - method getAttributeNS : js_string t -> js_string t -> js_string t opt meth + method getAttributeNS : js_string t -> js_string t -> js_string t opt meth - method setAttributeNS : js_string t -> js_string t -> js_string t -> unit meth + method setAttributeNS : js_string t -> js_string t -> js_string t -> unit meth - method removeAttributeNS : js_string t -> js_string t -> unit meth + method removeAttributeNS : js_string t -> js_string t -> unit meth - method hasAttributeNS : js_string t -> js_string t -> bool t meth + method hasAttributeNS : js_string t -> js_string t -> bool t meth - method getAttributeNode : js_string t -> attr t opt meth + method getAttributeNode : js_string t -> attr t opt meth - method setAttributeNode : attr t -> attr t opt meth + method setAttributeNode : attr t -> attr t opt meth - method removeAttributeNode : attr t -> attr t meth + method removeAttributeNode : attr t -> attr t meth - method getAttributeNodeNS : js_string t -> js_string t -> attr t opt meth + method getAttributeNodeNS : js_string t -> js_string t -> attr t opt meth - method setAttributeNodeNS : attr t -> attr t opt meth + method setAttributeNodeNS : attr t -> attr t opt meth - method getElementsByTagName : js_string t -> element nodeList t meth + method getElementsByTagName : js_string t -> element nodeList t meth - method attributes : attr namedNodeMap t readonly_prop - end + method attributes : attr namedNodeMap t readonly_prop +end (** Specification of [CharacterData] objects. *) -class type characterData = - object - inherit node +class type characterData = object + inherit node - method data : js_string t prop + method data : js_string t prop - method length : int readonly_prop + method length : int readonly_prop - method subjs_stringData : int -> int -> js_string t meth + method subjs_stringData : int -> int -> js_string t meth - method appendData : js_string t -> unit meth + method appendData : js_string t -> unit meth - method insertData : int -> js_string t -> unit meth + method insertData : int -> js_string t -> unit meth - method deleteData : int -> int -> unit meth + method deleteData : int -> int -> unit meth - method replaceData : int -> int -> js_string t -> unit meth - end + method replaceData : int -> int -> js_string t -> unit meth +end class type comment = characterData (** Specification of [Comment] objects *) @@ -213,32 +207,31 @@ class type documentFragment = node (** Specification of [DocumentFragment] objects. *) (** Specification of [Document] objects. *) -class type ['element] document = - object - inherit node +class type ['element] document = object + inherit node - method documentElement : 'element t readonly_prop + method documentElement : 'element t readonly_prop - method createDocumentFragment : documentFragment t meth + method createDocumentFragment : documentFragment t meth - method createElement : js_string t -> 'element t meth + method createElement : js_string t -> 'element t meth - method createElementNS : js_string t -> js_string t -> 'element t meth + method createElementNS : js_string t -> js_string t -> 'element t meth - method createTextNode : js_string t -> text t meth + method createTextNode : js_string t -> text t meth - method createAttribute : js_string t -> attr t meth + method createAttribute : js_string t -> attr t meth - method createComment : js_string t -> comment t meth + method createComment : js_string t -> comment t meth - method getElementById : js_string t -> 'element t opt meth + method getElementById : js_string t -> 'element t opt meth - method getElementsByTagName : js_string t -> 'element nodeList t meth + method getElementsByTagName : js_string t -> 'element nodeList t meth - method importNode : element t -> bool t -> 'element t meth + method importNode : element t -> bool t -> 'element t meth - method adoptNode : element t -> 'element t meth - end + method adoptNode : element t -> 'element t meth +end (** {2 Helper functions} *) @@ -292,24 +285,22 @@ type (-'a, -'b) event_listener ['a] is the type of the target object; the second parameter ['b] is the type of the event object. *) -class type ['a] event = - object - method _type : js_string t readonly_prop +class type ['a] event = object + method _type : js_string t readonly_prop - method target : 'a t opt readonly_prop + method target : 'a t opt readonly_prop - method currentTarget : 'a t opt readonly_prop + method currentTarget : 'a t opt readonly_prop - (* Legacy methods *) - method srcElement : 'a t opt readonly_prop - end + (* Legacy methods *) + method srcElement : 'a t opt readonly_prop +end -class type ['a, 'b] customEvent = - object - inherit ['a] event +class type ['a, 'b] customEvent = object + inherit ['a] event - method detail : 'b Js.opt Js.readonly_prop - end + method detail : 'b Js.opt Js.readonly_prop +end (** {2 Event handlers} *) @@ -380,11 +371,10 @@ val createCustomEvent : (** {2 Other DOM objects} *) -class type stringList = - object - method item : int -> js_string t opt meth +class type stringList = object + method item : int -> js_string t opt meth - method length : int readonly_prop + method length : int readonly_prop - method contains : js_string t -> bool t meth - end + method contains : js_string t -> bool t meth +end diff --git a/lib/js_of_ocaml/dom_html.ml b/lib/js_of_ocaml/dom_html.ml index b579b89f37..ba89cbf405 100644 --- a/lib/js_of_ocaml/dom_html.ml +++ b/lib/js_of_ocaml/dom_html.ml @@ -29,239 +29,238 @@ external html_escape : js_string t -> js_string t = "caml_js_html_escape" external decode_html_entities : js_string t -> js_string t = "caml_js_html_entities" -class type cssStyleDeclaration = - object - method setProperty : - js_string t -> js_string t -> js_string t optdef -> js_string t meth +class type cssStyleDeclaration = object + method setProperty : + js_string t -> js_string t -> js_string t optdef -> js_string t meth - method getPropertyValue : js_string t -> js_string t meth + method getPropertyValue : js_string t -> js_string t meth - method getPropertyPriority : js_string t -> js_string t meth + method getPropertyPriority : js_string t -> js_string t meth - method removeProperty : js_string t -> js_string t meth + method removeProperty : js_string t -> js_string t meth - method animation : js_string t prop + method animation : js_string t prop - method animationDelay : js_string t prop + method animationDelay : js_string t prop - method animationDirection : js_string t prop + method animationDirection : js_string t prop - method animationDuration : js_string t prop + method animationDuration : js_string t prop - method animationFillMode : js_string t prop + method animationFillMode : js_string t prop - method animationIterationCount : js_string t prop + method animationIterationCount : js_string t prop - method animationName : js_string t prop + method animationName : js_string t prop - method animationPlayState : js_string t prop + method animationPlayState : js_string t prop - method animationTimingFunction : js_string t prop + method animationTimingFunction : js_string t prop - method background : js_string t prop + method background : js_string t prop - method backgroundAttachment : js_string t prop + method backgroundAttachment : js_string t prop - method backgroundColor : js_string t prop + method backgroundColor : js_string t prop - method backgroundImage : js_string t prop + method backgroundImage : js_string t prop - method backgroundPosition : js_string t prop + method backgroundPosition : js_string t prop - method backgroundRepeat : js_string t prop + method backgroundRepeat : js_string t prop - method border : js_string t prop + method border : js_string t prop - method borderBottom : js_string t prop + method borderBottom : js_string t prop - method borderBottomColor : js_string t prop + method borderBottomColor : js_string t prop - method borderBottomStyle : js_string t prop + method borderBottomStyle : js_string t prop - method borderBottomWidth : js_string t prop + method borderBottomWidth : js_string t prop - method borderCollapse : js_string t prop + method borderCollapse : js_string t prop - method borderColor : js_string t prop + method borderColor : js_string t prop - method borderLeft : js_string t prop + method borderLeft : js_string t prop - method borderLeftColor : js_string t prop + method borderLeftColor : js_string t prop - method borderLeftStyle : js_string t prop + method borderLeftStyle : js_string t prop - method borderLeftWidth : js_string t prop + method borderLeftWidth : js_string t prop - method borderRadius : js_string t prop + method borderRadius : js_string t prop - method borderRight : js_string t prop + method borderRight : js_string t prop - method borderRightColor : js_string t prop + method borderRightColor : js_string t prop - method borderRightStyle : js_string t prop + method borderRightStyle : js_string t prop - method borderRightWidth : js_string t prop + method borderRightWidth : js_string t prop - method borderSpacing : js_string t prop + method borderSpacing : js_string t prop - method borderStyle : js_string t prop + method borderStyle : js_string t prop - method borderTop : js_string t prop + method borderTop : js_string t prop - method borderTopColor : js_string t prop + method borderTopColor : js_string t prop - method borderTopStyle : js_string t prop + method borderTopStyle : js_string t prop - method borderTopWidth : js_string t prop + method borderTopWidth : js_string t prop - method borderWidth : js_string t prop + method borderWidth : js_string t prop - method bottom : js_string t prop + method bottom : js_string t prop - method captionSide : js_string t prop + method captionSide : js_string t prop - method clear : js_string t prop + method clear : js_string t prop - method clip : js_string t prop + method clip : js_string t prop - method color : js_string t prop + method color : js_string t prop - method content : js_string t prop + method content : js_string t prop - method counterIncrement : js_string t prop + method counterIncrement : js_string t prop - method counterReset : js_string t prop + method counterReset : js_string t prop - method cssFloat : js_string t prop + method cssFloat : js_string t prop - method cssText : js_string t prop + method cssText : js_string t prop - method cursor : js_string t prop + method cursor : js_string t prop - method direction : js_string t prop + method direction : js_string t prop - method display : js_string t prop + method display : js_string t prop - method emptyCells : js_string t prop + method emptyCells : js_string t prop - method fill : js_string t prop + method fill : js_string t prop - method font : js_string t prop + method font : js_string t prop - method fontFamily : js_string t prop + method fontFamily : js_string t prop - method fontSize : js_string t prop + method fontSize : js_string t prop - method fontStyle : js_string t prop + method fontStyle : js_string t prop - method fontVariant : js_string t prop + method fontVariant : js_string t prop - method fontWeight : js_string t prop + method fontWeight : js_string t prop - method height : js_string t prop + method height : js_string t prop - method left : js_string t prop + method left : js_string t prop - method letterSpacing : js_string t prop + method letterSpacing : js_string t prop - method lineHeight : js_string t prop + method lineHeight : js_string t prop - method listStyle : js_string t prop + method listStyle : js_string t prop - method listStyleImage : js_string t prop + method listStyleImage : js_string t prop - method listStylePosition : js_string t prop + method listStylePosition : js_string t prop - method listStyleType : js_string t prop + method listStyleType : js_string t prop - method margin : js_string t prop + method margin : js_string t prop - method marginBottom : js_string t prop + method marginBottom : js_string t prop - method marginLeft : js_string t prop + method marginLeft : js_string t prop - method marginRight : js_string t prop + method marginRight : js_string t prop - method marginTop : js_string t prop + method marginTop : js_string t prop - method maxHeight : js_string t prop + method maxHeight : js_string t prop - method maxWidth : js_string t prop + method maxWidth : js_string t prop - method minHeight : js_string t prop + method minHeight : js_string t prop - method minWidth : js_string t prop + method minWidth : js_string t prop - method opacity : js_string t optdef prop + method opacity : js_string t optdef prop - method outline : js_string t prop + method outline : js_string t prop - method outlineColor : js_string t prop + method outlineColor : js_string t prop - method outlineOffset : js_string t prop + method outlineOffset : js_string t prop - method outlineStyle : js_string t prop + method outlineStyle : js_string t prop - method outlineWidth : js_string t prop + method outlineWidth : js_string t prop - method overflow : js_string t prop + method overflow : js_string t prop - method overflowX : js_string t prop + method overflowX : js_string t prop - method overflowY : js_string t prop + method overflowY : js_string t prop - method padding : js_string t prop + method padding : js_string t prop - method paddingBottom : js_string t prop + method paddingBottom : js_string t prop - method paddingLeft : js_string t prop + method paddingLeft : js_string t prop - method paddingRight : js_string t prop + method paddingRight : js_string t prop - method paddingTop : js_string t prop + method paddingTop : js_string t prop - method pageBreakAfter : js_string t prop + method pageBreakAfter : js_string t prop - method pageBreakBefore : js_string t prop + method pageBreakBefore : js_string t prop - method pointerEvents : js_string t prop + method pointerEvents : js_string t prop - method position : js_string t prop + method position : js_string t prop - method right : js_string t prop + method right : js_string t prop - method stroke : js_string t prop + method stroke : js_string t prop - method strokeWidth : js_string t prop + method strokeWidth : js_string t prop - method tableLayout : js_string t prop + method tableLayout : js_string t prop - method textAlign : js_string t prop + method textAlign : js_string t prop - method textAnchor : js_string t prop + method textAnchor : js_string t prop - method textDecoration : js_string t prop + method textDecoration : js_string t prop - method textIndent : js_string t prop + method textIndent : js_string t prop - method textTransform : js_string t prop + method textTransform : js_string t prop - method top : js_string t prop + method top : js_string t prop - method transform : js_string t prop + method transform : js_string t prop - method verticalAlign : js_string t prop + method verticalAlign : js_string t prop - method visibility : js_string t prop + method visibility : js_string t prop - method whiteSpace : js_string t prop + method whiteSpace : js_string t prop - method width : js_string t prop + method width : js_string t prop - method wordSpacing : js_string t prop + method wordSpacing : js_string t prop - method zIndex : js_string t prop - end + method zIndex : js_string t prop +end type ('a, 'b) event_listener = ('a, 'b) Dom.event_listener @@ -276,519 +275,489 @@ type delta_mode = | Delta_line | Delta_page -class type event = - object - inherit [element] Dom.event - end +class type event = object + inherit [element] Dom.event +end -and ['a] customEvent = - object - inherit [element, 'a] Dom.customEvent - end +and ['a] customEvent = object + inherit [element, 'a] Dom.customEvent +end -and focusEvent = - object - inherit event +and focusEvent = object + inherit event - method relatedTarget : element t opt optdef readonly_prop - end + method relatedTarget : element t opt optdef readonly_prop +end -and mouseEvent = - object - inherit event +and mouseEvent = object + inherit event - method relatedTarget : element t opt optdef readonly_prop + method relatedTarget : element t opt optdef readonly_prop - method clientX : int readonly_prop + method clientX : int readonly_prop - method clientY : int readonly_prop + method clientY : int readonly_prop - method screenX : int readonly_prop + method screenX : int readonly_prop - method screenY : int readonly_prop + method screenY : int readonly_prop - method offsetX : int readonly_prop + method offsetX : int readonly_prop - method offsetY : int readonly_prop + method offsetY : int readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method button : int readonly_prop + method button : int readonly_prop - method which : mouse_button optdef readonly_prop + method which : mouse_button optdef readonly_prop - method fromElement : element t opt optdef readonly_prop + method fromElement : element t opt optdef readonly_prop - method toElement : element t opt optdef readonly_prop + method toElement : element t opt optdef readonly_prop - method pageX : int optdef readonly_prop + method pageX : int optdef readonly_prop - method pageY : int optdef readonly_prop - end + method pageY : int optdef readonly_prop +end -and keyboardEvent = - object - inherit event +and keyboardEvent = object + inherit event - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method location : int readonly_prop + method location : int readonly_prop - method key : js_string t optdef readonly_prop + method key : js_string t optdef readonly_prop - method code : js_string t optdef readonly_prop + method code : js_string t optdef readonly_prop - method which : int optdef readonly_prop + method which : int optdef readonly_prop - method charCode : int optdef readonly_prop + method charCode : int optdef readonly_prop - method keyCode : int readonly_prop + method keyCode : int readonly_prop - method getModifierState : js_string t -> bool t meth + method getModifierState : js_string t -> bool t meth - method keyIdentifier : js_string t optdef readonly_prop - end + method keyIdentifier : js_string t optdef readonly_prop +end -and mousewheelEvent = - object - (* All modern browsers *) - inherit mouseEvent +and mousewheelEvent = object + (* All modern browsers *) + inherit mouseEvent - method wheelDelta : int readonly_prop + method wheelDelta : int readonly_prop - method wheelDeltaX : int optdef readonly_prop + method wheelDeltaX : int optdef readonly_prop - method wheelDeltaY : int optdef readonly_prop + method wheelDeltaY : int optdef readonly_prop - method deltaX : float readonly_prop + method deltaX : float readonly_prop - method deltaY : float readonly_prop + method deltaY : float readonly_prop - method deltaZ : float readonly_prop + method deltaZ : float readonly_prop - method deltaMode : delta_mode readonly_prop - end + method deltaMode : delta_mode readonly_prop +end -and mouseScrollEvent = - object - (* Firefox *) - inherit mouseEvent +and mouseScrollEvent = object + (* Firefox *) + inherit mouseEvent - method detail : int readonly_prop + method detail : int readonly_prop - method axis : int optdef readonly_prop + method axis : int optdef readonly_prop - method _HORIZONTAL_AXIS : int optdef readonly_prop + method _HORIZONTAL_AXIS : int optdef readonly_prop - method _VERTICAL_AXIS : int optdef readonly_prop - end + method _VERTICAL_AXIS : int optdef readonly_prop +end -and touchEvent = - object - inherit event +and touchEvent = object + inherit event - method touches : touchList t readonly_prop + method touches : touchList t readonly_prop - method targetTouches : touchList t readonly_prop + method targetTouches : touchList t readonly_prop - method changedTouches : touchList t readonly_prop + method changedTouches : touchList t readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method relatedTarget : element t opt optdef readonly_prop - end + method relatedTarget : element t opt optdef readonly_prop +end -and touchList = - object - method length : int readonly_prop +and touchList = object + method length : int readonly_prop - method item : int -> touch t optdef meth - end + method item : int -> touch t optdef meth +end -and touch = - object - method identifier : int readonly_prop +and touch = object + method identifier : int readonly_prop - method target : element t optdef readonly_prop + method target : element t optdef readonly_prop - method screenX : int readonly_prop + method screenX : int readonly_prop - method screenY : int readonly_prop + method screenY : int readonly_prop - method clientX : int readonly_prop + method clientX : int readonly_prop - method clientY : int readonly_prop + method clientY : int readonly_prop - method pageX : int readonly_prop + method pageX : int readonly_prop - method pageY : int readonly_prop - end + method pageY : int readonly_prop +end -and submitEvent = - object - inherit event +and submitEvent = object + inherit event - method submitter : element t optdef readonly_prop - end + method submitter : element t optdef readonly_prop +end -and dragEvent = - object - inherit mouseEvent +and dragEvent = object + inherit mouseEvent - method dataTransfer : dataTransfer t readonly_prop - end + method dataTransfer : dataTransfer t readonly_prop +end -and clipboardEvent = - object - inherit event +and clipboardEvent = object + inherit event - method clipboardData : dataTransfer t readonly_prop - end + method clipboardData : dataTransfer t readonly_prop +end -and dataTransfer = - object - method dropEffect : js_string t prop +and dataTransfer = object + method dropEffect : js_string t prop - method effectAllowed : js_string t prop + method effectAllowed : js_string t prop - method files : File.fileList t readonly_prop + method files : File.fileList t readonly_prop - method types : js_string t js_array t readonly_prop + method types : js_string t js_array t readonly_prop - method addElement : element t -> unit meth + method addElement : element t -> unit meth - method clearData : js_string t -> unit meth + method clearData : js_string t -> unit meth - method clearData_all : unit meth + method clearData_all : unit meth - method getData : js_string t -> js_string t meth + method getData : js_string t -> js_string t meth - method setData : js_string t -> js_string t -> unit meth + method setData : js_string t -> js_string t -> unit meth - method setDragImage : element t -> int -> int -> unit meth - end + method setDragImage : element t -> int -> int -> unit meth +end -and eventTarget = - object ('self) - method onclick : ('self t, mouseEvent t) event_listener writeonly_prop +and eventTarget = object ('self) + method onclick : ('self t, mouseEvent t) event_listener writeonly_prop - method ondblclick : ('self t, mouseEvent t) event_listener writeonly_prop + method ondblclick : ('self t, mouseEvent t) event_listener writeonly_prop - method onmousedown : ('self t, mouseEvent t) event_listener writeonly_prop + method onmousedown : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseup : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseup : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseover : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseover : ('self t, mouseEvent t) event_listener writeonly_prop - method onmousemove : ('self t, mouseEvent t) event_listener writeonly_prop + method onmousemove : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseout : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseout : ('self t, mouseEvent t) event_listener writeonly_prop - method onkeypress : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeypress : ('self t, keyboardEvent t) event_listener writeonly_prop - method onkeydown : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeydown : ('self t, keyboardEvent t) event_listener writeonly_prop - method onkeyup : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeyup : ('self t, keyboardEvent t) event_listener writeonly_prop - method onscroll : ('self t, event t) event_listener writeonly_prop + method onscroll : ('self t, event t) event_listener writeonly_prop - method onwheel : ('self t, mousewheelEvent t) event_listener writeonly_prop + method onwheel : ('self t, mousewheelEvent t) event_listener writeonly_prop - method ondragstart : ('self t, dragEvent t) event_listener writeonly_prop + method ondragstart : ('self t, dragEvent t) event_listener writeonly_prop - method ondragend : ('self t, dragEvent t) event_listener writeonly_prop + method ondragend : ('self t, dragEvent t) event_listener writeonly_prop - method ondragenter : ('self t, dragEvent t) event_listener writeonly_prop + method ondragenter : ('self t, dragEvent t) event_listener writeonly_prop - method ondragover : ('self t, dragEvent t) event_listener writeonly_prop + method ondragover : ('self t, dragEvent t) event_listener writeonly_prop - method ondragleave : ('self t, dragEvent t) event_listener writeonly_prop + method ondragleave : ('self t, dragEvent t) event_listener writeonly_prop - method ondrag : ('self t, dragEvent t) event_listener writeonly_prop + method ondrag : ('self t, dragEvent t) event_listener writeonly_prop - method ondrop : ('self t, dragEvent t) event_listener writeonly_prop + method ondrop : ('self t, dragEvent t) event_listener writeonly_prop - method onanimationstart : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationstart : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationend : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationend : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationiteration : - ('self t, animationEvent t) event_listener writeonly_prop + method onanimationiteration : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationcancel : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationcancel : ('self t, animationEvent t) event_listener writeonly_prop - method ontransitionrun : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionrun : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitionstart : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionstart : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitionend : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionend : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitioncancel : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitioncancel : ('self t, transitionEvent t) event_listener writeonly_prop - method ongotpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop + method ongotpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop - method onlostpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop + method onlostpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerenter : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerenter : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointercancel : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointercancel : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerdown : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerdown : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerleave : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerleave : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointermove : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointermove : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerout : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerout : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerover : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerover : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerup : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerup : ('self t, pointerEvent t) event_listener writeonly_prop - method dispatchEvent : event t -> bool t meth - end + method dispatchEvent : event t -> bool t meth +end -and popStateEvent = - object - inherit event +and popStateEvent = object + inherit event - method state : Js.Unsafe.any readonly_prop - end + method state : Js.Unsafe.any readonly_prop +end -and pointerEvent = - object - inherit mouseEvent +and pointerEvent = object + inherit mouseEvent - method pointerId : int Js.readonly_prop + method pointerId : int Js.readonly_prop - method width : float Js.readonly_prop + method width : float Js.readonly_prop - method height : float Js.readonly_prop + method height : float Js.readonly_prop - method pressure : float Js.readonly_prop + method pressure : float Js.readonly_prop - method tangentialPressure : float Js.readonly_prop + method tangentialPressure : float Js.readonly_prop - method tiltX : int Js.readonly_prop + method tiltX : int Js.readonly_prop - method tiltY : int Js.readonly_prop + method tiltY : int Js.readonly_prop - method twist : int Js.readonly_prop + method twist : int Js.readonly_prop - method pointerType : Js.js_string Js.t Js.readonly_prop + method pointerType : Js.js_string Js.t Js.readonly_prop - method isPrimary : bool Js.t Js.readonly_prop - end + method isPrimary : bool Js.t Js.readonly_prop +end -and storageEvent = - object - inherit event +and storageEvent = object + inherit event - method key : js_string t opt readonly_prop + method key : js_string t opt readonly_prop - method oldValue : js_string t opt readonly_prop + method oldValue : js_string t opt readonly_prop - method newValue : js_string t opt readonly_prop + method newValue : js_string t opt readonly_prop - method url : js_string t readonly_prop + method url : js_string t readonly_prop - method storageArea : storage t opt readonly_prop - end + method storageArea : storage t opt readonly_prop +end -and storage = - object - method length : int readonly_prop +and storage = object + method length : int readonly_prop - method key : int -> js_string t opt meth + method key : int -> js_string t opt meth - method getItem : js_string t -> js_string t opt meth + method getItem : js_string t -> js_string t opt meth - method setItem : js_string t -> js_string t -> unit meth + method setItem : js_string t -> js_string t -> unit meth - method removeItem : js_string t -> unit meth + method removeItem : js_string t -> unit meth - method clear : unit meth - end + method clear : unit meth +end -and hashChangeEvent = - object - inherit event +and hashChangeEvent = object + inherit event - method oldURL : js_string t readonly_prop + method oldURL : js_string t readonly_prop - method newURL : js_string t readonly_prop - end + method newURL : js_string t readonly_prop +end -and animationEvent = - object - inherit event +and animationEvent = object + inherit event - method animationName : js_string t readonly_prop + method animationName : js_string t readonly_prop - method elapsedTime : float readonly_prop + method elapsedTime : float readonly_prop - method pseudoElement : js_string t readonly_prop - end + method pseudoElement : js_string t readonly_prop +end -and transitionEvent = - object - inherit event +and transitionEvent = object + inherit event - method propertyName : js_string t readonly_prop + method propertyName : js_string t readonly_prop - method elapsedTime : float readonly_prop + method elapsedTime : float readonly_prop - method pseudoElement : js_string t readonly_prop - end + method pseudoElement : js_string t readonly_prop +end -and mediaEvent = - object - inherit event - end +and mediaEvent = object + inherit event +end -and messageEvent = - object - inherit event +and messageEvent = object + inherit event - method data : Unsafe.any opt readonly_prop + method data : Unsafe.any opt readonly_prop - method source : Unsafe.any opt readonly_prop - end + method source : Unsafe.any opt readonly_prop +end -and nodeSelector = - object - method querySelector : js_string t -> element t opt meth +and nodeSelector = object + method querySelector : js_string t -> element t opt meth - method querySelectorAll : js_string t -> element Dom.nodeList t meth - end + method querySelectorAll : js_string t -> element Dom.nodeList t meth +end -and tokenList = - object - method length : int readonly_prop +and tokenList = object + method length : int readonly_prop - method item : int -> js_string t optdef meth + method item : int -> js_string t optdef meth - method contains : js_string t -> bool t meth + method contains : js_string t -> bool t meth - method add : js_string t -> unit meth + method add : js_string t -> unit meth - method remove : js_string t -> unit meth + method remove : js_string t -> unit meth - method toggle : js_string t -> bool t meth + method toggle : js_string t -> bool t meth - method stringifier : js_string t prop - end + method stringifier : js_string t prop +end -and element = - object - inherit Dom.element +and element = object + inherit Dom.element - inherit nodeSelector + inherit nodeSelector - method id : js_string t prop + method id : js_string t prop - method title : js_string t prop + method title : js_string t prop - method lang : js_string t prop + method lang : js_string t prop - method dir : js_string t prop + method dir : js_string t prop - method className : js_string t prop + method className : js_string t prop - method classList : tokenList t readonly_prop + method classList : tokenList t readonly_prop - method closest : js_string t -> element t opt meth + method closest : js_string t -> element t opt meth - method style : cssStyleDeclaration t prop + method style : cssStyleDeclaration t prop - method innerHTML : js_string t prop + method innerHTML : js_string t prop - method outerHTML : js_string t prop + method outerHTML : js_string t prop - method textContent : js_string t opt prop + method textContent : js_string t opt prop - method innerText : js_string t prop + method innerText : js_string t prop - method clientLeft : int readonly_prop + method clientLeft : int readonly_prop - method clientTop : int readonly_prop + method clientTop : int readonly_prop - method clientWidth : int readonly_prop + method clientWidth : int readonly_prop - method clientHeight : int readonly_prop + method clientHeight : int readonly_prop - method offsetLeft : int readonly_prop + method offsetLeft : int readonly_prop - method offsetTop : int readonly_prop + method offsetTop : int readonly_prop - method offsetParent : element t opt readonly_prop + method offsetParent : element t opt readonly_prop - method offsetWidth : int readonly_prop + method offsetWidth : int readonly_prop - method offsetHeight : int readonly_prop + method offsetHeight : int readonly_prop - method scrollLeft : int prop + method scrollLeft : int prop - method scrollTop : int prop + method scrollTop : int prop - method scrollWidth : int prop + method scrollWidth : int prop - method scrollHeight : int prop + method scrollHeight : int prop - method getClientRects : clientRectList t meth + method getClientRects : clientRectList t meth - method getBoundingClientRect : clientRect t meth + method getBoundingClientRect : clientRect t meth - method scrollIntoView : bool t -> unit meth + method scrollIntoView : bool t -> unit meth - method click : unit meth + method click : unit meth - method focus : unit meth + method focus : unit meth - method blur : unit meth + method blur : unit meth - inherit eventTarget - end + inherit eventTarget +end -and clientRect = - object - method top : float readonly_prop +and clientRect = object + method top : float readonly_prop - method right : float readonly_prop + method right : float readonly_prop - method bottom : float readonly_prop + method bottom : float readonly_prop - method left : float readonly_prop + method left : float readonly_prop - method width : float optdef readonly_prop + method width : float optdef readonly_prop - method height : float optdef readonly_prop - end + method height : float optdef readonly_prop +end -and clientRectList = - object - method length : int readonly_prop +and clientRectList = object + method length : int readonly_prop - method item : int -> clientRect t opt meth - end + method item : int -> clientRect t opt meth +end let no_handler : ('a, 'b) event_listener = Dom.no_handler @@ -996,338 +965,321 @@ let removeEventListener = Dom.removeEventListener let createCustomEvent = Dom.createCustomEvent -class type ['node] collection = - object - method length : int readonly_prop +class type ['node] collection = object + method length : int readonly_prop - method item : int -> 'node t opt meth + method item : int -> 'node t opt meth - method namedItem : js_string t -> 'node t opt meth - end + method namedItem : js_string t -> 'node t opt meth +end class type htmlElement = element -class type headElement = - object - inherit element +class type headElement = object + inherit element - method profile : js_string t prop - end + method profile : js_string t prop +end -class type linkElement = - object - inherit element +class type linkElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method charset : js_string t prop + method charset : js_string t prop - method crossorigin : js_string t prop + method crossorigin : js_string t prop - method href : js_string t prop + method href : js_string t prop - method hreflang : js_string t prop + method hreflang : js_string t prop - method media : js_string t prop + method media : js_string t prop - method rel : js_string t prop + method rel : js_string t prop - method rev : js_string t prop + method rev : js_string t prop - method target : js_string t prop + method target : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type titleElement = - object - inherit element +class type titleElement = object + inherit element - method text : js_string t prop - end + method text : js_string t prop +end -class type metaElement = - object - inherit element +class type metaElement = object + inherit element - method content : js_string t prop + method content : js_string t prop - method httpEquiv : js_string t prop + method httpEquiv : js_string t prop - method name : js_string t prop + method name : js_string t prop - method scheme : js_string t prop - end + method scheme : js_string t prop +end -class type baseElement = - object - inherit element +class type baseElement = object + inherit element - method href : js_string t prop + method href : js_string t prop - method target : js_string t prop - end + method target : js_string t prop +end -class type styleElement = - object - inherit element +class type styleElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method media : js_string t prop + method media : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end class type bodyElement = element -class type formElement = - object - inherit element +class type formElement = object + inherit element - method elements : element collection t readonly_prop + method elements : element collection t readonly_prop - method length : int readonly_prop + method length : int readonly_prop - method acceptCharset : js_string t prop + method acceptCharset : js_string t prop - method action : js_string t prop + method action : js_string t prop - method enctype : js_string t prop + method enctype : js_string t prop - method _method : js_string t prop + method _method : js_string t prop - method target : js_string t prop + method target : js_string t prop - method submit : unit meth + method submit : unit meth - method reset : unit meth + method reset : unit meth - method onsubmit : ('self t, submitEvent t) event_listener writeonly_prop - end + method onsubmit : ('self t, submitEvent t) event_listener writeonly_prop +end -class type optGroupElement = - object - inherit element +class type optGroupElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method label : js_string t prop - end + method label : js_string t prop +end -class type optionElement = - object - inherit optGroupElement +class type optionElement = object + inherit optGroupElement - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method defaultSelected : bool t prop + method defaultSelected : bool t prop - method text : js_string t readonly_prop + method text : js_string t readonly_prop - method index : int readonly_prop + method index : int readonly_prop - method selected : bool t prop + method selected : bool t prop - method value : js_string t prop - end + method value : js_string t prop +end -class type selectElement = - object ('self) - inherit element +class type selectElement = object ('self) + inherit element - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method selectedIndex : int prop + method selectedIndex : int prop - method value : js_string t prop + method value : js_string t prop - method length : int prop + method length : int prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method options : optionElement collection t readonly_prop + method options : optionElement collection t readonly_prop - method disabled : bool t prop + method disabled : bool t prop - method multiple : bool t prop + method multiple : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method size : int prop + method size : int prop - method tabIndex : int prop + method tabIndex : int prop - method add : #optGroupElement t -> #optGroupElement t opt -> unit meth + method add : #optGroupElement t -> #optGroupElement t opt -> unit meth - method remove : int -> unit meth + method remove : int -> unit meth - method required : bool t writeonly_prop + method required : bool t writeonly_prop - method onchange : ('self t, event t) event_listener prop + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop - end + method oninput : ('self t, event t) event_listener prop +end -class type inputElement = - object ('self) - inherit element +class type inputElement = object ('self) + inherit element - method defaultValue : js_string t prop + method defaultValue : js_string t prop - method defaultChecked : js_string t prop + method defaultChecked : js_string t prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accept : js_string t prop + method accept : js_string t prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method align : js_string t prop + method align : js_string t prop - method alt : js_string t prop + method alt : js_string t prop - method checked : bool t prop + method checked : bool t prop - method disabled : bool t prop + method disabled : bool t prop - method maxLength : int prop + method maxLength : int prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method readOnly : bool t prop + method readOnly : bool t prop - method required : bool t writeonly_prop + method required : bool t writeonly_prop - method size : int prop + method size : int prop - method src : js_string t prop + method src : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method useMap : js_string t prop + method useMap : js_string t prop - method value : js_string t prop + method value : js_string t prop - method select : unit meth + method select : unit meth - method files : File.fileList t optdef readonly_prop + method files : File.fileList t optdef readonly_prop - method placeholder : js_string t writeonly_prop + method placeholder : js_string t writeonly_prop - method selectionDirection : js_string t prop + method selectionDirection : js_string t prop - method selectionStart : int prop + method selectionStart : int prop - method selectionEnd : int prop + method selectionEnd : int prop - method onselect : ('self t, event t) event_listener prop + method onselect : ('self t, event t) event_listener prop - method onchange : ('self t, event t) event_listener prop + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop + method oninput : ('self t, event t) event_listener prop - method onblur : ('self t, focusEvent t) event_listener prop + method onblur : ('self t, focusEvent t) event_listener prop - method onfocus : ('self t, focusEvent t) event_listener prop - end + method onfocus : ('self t, focusEvent t) event_listener prop +end -class type textAreaElement = - object ('self) - inherit element +class type textAreaElement = object ('self) + inherit element - method defaultValue : js_string t prop + method defaultValue : js_string t prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method cols : int prop + method cols : int prop - method disabled : bool t prop + method disabled : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method readOnly : bool t prop + method readOnly : bool t prop - method rows : int prop + method rows : int prop - method selectionDirection : js_string t prop + method selectionDirection : js_string t prop - method selectionEnd : int prop + method selectionEnd : int prop - method selectionStart : int prop + method selectionStart : int prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method value : js_string t prop + method value : js_string t prop - method select : unit meth + method select : unit meth - method required : bool t writeonly_prop + method required : bool t writeonly_prop - method placeholder : js_string t writeonly_prop + method placeholder : js_string t writeonly_prop - method onselect : ('self t, event t) event_listener prop + method onselect : ('self t, event t) event_listener prop - method onchange : ('self t, event t) event_listener prop + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop + method oninput : ('self t, event t) event_listener prop - method onblur : ('self t, focusEvent t) event_listener prop + method onblur : ('self t, focusEvent t) event_listener prop - method onfocus : ('self t, focusEvent t) event_listener prop - end + method onfocus : ('self t, focusEvent t) event_listener prop +end -class type buttonElement = - object - inherit element +class type buttonElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method disabled : bool t prop + method disabled : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method value : js_string t prop - end + method value : js_string t prop +end -class type labelElement = - object - inherit element +class type labelElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method htmlFor : js_string t prop - end + method htmlFor : js_string t prop +end -class type fieldSetElement = - object - inherit element +class type fieldSetElement = object + inherit element - method form : formElement t opt readonly_prop - end + method form : formElement t opt readonly_prop +end -class type legendElement = - object - inherit element +class type legendElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop - end + method accessKey : js_string t prop +end class type uListElement = element @@ -1343,12 +1295,11 @@ class type paragraphElement = element class type headingElement = element -class type quoteElement = - object - inherit element +class type quoteElement = object + inherit element - method cite : js_string t prop - end + method cite : js_string t prop +end class type preElement = element @@ -1356,324 +1307,309 @@ class type brElement = element class type hrElement = element -class type modElement = - object - inherit element +class type modElement = object + inherit element - method cite : js_string t prop + method cite : js_string t prop - method dateTime : js_string t prop - end + method dateTime : js_string t prop +end -class type anchorElement = - object - inherit element +class type anchorElement = object + inherit element - method accessKey : js_string t prop + method accessKey : js_string t prop - method charset : js_string t prop + method charset : js_string t prop - method coords : js_string t prop + method coords : js_string t prop - method href : js_string t prop + method href : js_string t prop - method hreflang : js_string t prop + method hreflang : js_string t prop - method name : js_string t prop + method name : js_string t prop - method rel : js_string t prop + method rel : js_string t prop - method rev : js_string t prop + method rev : js_string t prop - method shape : js_string t prop + method shape : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method target : js_string t prop + method target : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type imageElement = - object ('self) - inherit element +class type imageElement = object ('self) + inherit element - method alt : js_string t prop + method alt : js_string t prop - method src : js_string t prop + method src : js_string t prop - method useMap : js_string t prop + method useMap : js_string t prop - method isMap : bool t prop + method isMap : bool t prop - method width : int prop + method width : int prop - method height : int prop + method height : int prop - method naturalWidth : int optdef readonly_prop + method naturalWidth : int optdef readonly_prop - method naturalHeight : int optdef readonly_prop + method naturalHeight : int optdef readonly_prop - method complete : bool t prop + method complete : bool t prop - method onload : ('self t, event t) event_listener prop + method onload : ('self t, event t) event_listener prop - method onerror : ('self t, event t) event_listener prop + method onerror : ('self t, event t) event_listener prop - method onabort : ('self t, event t) event_listener prop - end + method onabort : ('self t, event t) event_listener prop +end -class type objectElement = - object - inherit element +class type objectElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method code : js_string t prop + method code : js_string t prop - method archive : js_string t prop + method archive : js_string t prop - method codeBase : js_string t prop + method codeBase : js_string t prop - method codeType : js_string t prop + method codeType : js_string t prop - method data : js_string t prop + method data : js_string t prop - method declare : bool t prop + method declare : bool t prop - method height : js_string t prop + method height : js_string t prop - method name : js_string t prop + method name : js_string t prop - method standby : js_string t prop + method standby : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t prop + method _type : js_string t prop - method useMap : js_string t prop + method useMap : js_string t prop - method width : js_string t prop + method width : js_string t prop - method document : Dom.element Dom.document t opt readonly_prop - end + method document : Dom.element Dom.document t opt readonly_prop +end -class type paramElement = - object - inherit element +class type paramElement = object + inherit element - method name : js_string t prop + method name : js_string t prop - method _type : js_string t prop + method _type : js_string t prop - method value : js_string t prop + method value : js_string t prop - method valueType : js_string t prop - end + method valueType : js_string t prop +end -class type areaElement = - object - inherit element +class type areaElement = object + inherit element - method accessKey : js_string t prop + method accessKey : js_string t prop - method alt : js_string t prop + method alt : js_string t prop - method coords : js_string t prop + method coords : js_string t prop - method href : js_string t prop + method href : js_string t prop - method noHref : bool t prop + method noHref : bool t prop - method shape : js_string t prop + method shape : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method target : js_string t prop - end + method target : js_string t prop +end -class type mapElement = - object - inherit element +class type mapElement = object + inherit element - method areas : areaElement collection t readonly_prop + method areas : areaElement collection t readonly_prop - method name : js_string t prop - end + method name : js_string t prop +end -class type scriptElement = - object - inherit element +class type scriptElement = object + inherit element - method text : js_string t prop + method text : js_string t prop - method charset : js_string t prop + method charset : js_string t prop - method defer : bool t prop + method defer : bool t prop - method src : js_string t prop + method src : js_string t prop - method _type : js_string t prop + method _type : js_string t prop - method async : bool t prop - end + method async : bool t prop +end -class type embedElement = - object - inherit element +class type embedElement = object + inherit element - method src : js_string t prop + method src : js_string t prop - method height : js_string t prop + method height : js_string t prop - method width : js_string t prop + method width : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type tableCellElement = - object - inherit element +class type tableCellElement = object + inherit element - method cellIndex : int readonly_prop + method cellIndex : int readonly_prop - method abbr : js_string t prop + method abbr : js_string t prop - method align : js_string t prop + method align : js_string t prop - method axis : js_string t prop + method axis : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method colSpan : int prop + method colSpan : int prop - method headers : js_string t prop + method headers : js_string t prop - method rowSpan : int prop + method rowSpan : int prop - method scope : js_string t prop + method scope : js_string t prop - method vAlign : js_string t prop - end + method vAlign : js_string t prop +end -class type tableRowElement = - object - inherit element +class type tableRowElement = object + inherit element - method rowIndex : int readonly_prop + method rowIndex : int readonly_prop - method sectionRowIndex : int readonly_prop + method sectionRowIndex : int readonly_prop - method cells : tableCellElement collection t readonly_prop + method cells : tableCellElement collection t readonly_prop - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method insertCell : int -> tableCellElement t meth + method insertCell : int -> tableCellElement t meth - method deleteCell : int -> unit meth - end + method deleteCell : int -> unit meth +end -class type tableColElement = - object - inherit element +class type tableColElement = object + inherit element - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method span : int prop + method span : int prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method width : js_string t prop - end + method width : js_string t prop +end -class type tableSectionElement = - object - inherit element +class type tableSectionElement = object + inherit element - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method rows : tableRowElement collection t readonly_prop + method rows : tableRowElement collection t readonly_prop - method insertRow : int -> tableRowElement t meth + method insertRow : int -> tableRowElement t meth - method deleteRow : int -> unit meth - end + method deleteRow : int -> unit meth +end class type tableCaptionElement = element -class type tableElement = - object - inherit element +class type tableElement = object + inherit element - method caption : tableCaptionElement t prop + method caption : tableCaptionElement t prop - method tHead : tableSectionElement t prop + method tHead : tableSectionElement t prop - method tFoot : tableSectionElement t prop + method tFoot : tableSectionElement t prop - method rows : tableRowElement collection t readonly_prop + method rows : tableRowElement collection t readonly_prop - method tBodies : tableSectionElement collection t readonly_prop + method tBodies : tableSectionElement collection t readonly_prop - method align : js_string t prop + method align : js_string t prop - method border : js_string t prop + method border : js_string t prop - method cellPadding : js_string t prop + method cellPadding : js_string t prop - method cellSpacing : js_string t prop + method cellSpacing : js_string t prop - method frame : js_string t prop + method frame : js_string t prop - method rules : js_string t prop + method rules : js_string t prop - method summary : js_string t prop + method summary : js_string t prop - method width : js_string t prop + method width : js_string t prop - method createTHead : tableSectionElement t meth + method createTHead : tableSectionElement t meth - method deleteTHead : unit meth + method deleteTHead : unit meth - method createTFoot : tableSectionElement t meth + method createTFoot : tableSectionElement t meth - method deleteTFoot : unit meth + method deleteTFoot : unit meth - method createCaption : tableCaptionElement t meth + method createCaption : tableCaptionElement t meth - method deleteCaption : unit meth + method deleteCaption : unit meth - method insertRow : int -> tableRowElement t meth + method insertRow : int -> tableRowElement t meth - method deleteRow : int -> unit meth - end + method deleteRow : int -> unit meth +end -class type timeRanges = - object - method length : int readonly_prop +class type timeRanges = object + method length : int readonly_prop - method start : int -> float meth + method start : int -> float meth - method end_ : int -> float meth - end + method end_ : int -> float meth +end type networkState = | NETWORK_EMPTY @@ -1690,108 +1626,105 @@ type readyState = (* http://www.w3schools.com/tags/ref_av_dom.asp *) (* only features supported by all browser. (IE9+) *) -class type mediaElement = - object - inherit element +class type mediaElement = object + inherit element - method canPlayType : js_string t -> js_string t meth + method canPlayType : js_string t -> js_string t meth - method load : unit meth + method load : unit meth - method play : unit meth + method play : unit meth - method pause : unit meth + method pause : unit meth - method autoplay : bool t prop + method autoplay : bool t prop - method buffered : timeRanges t readonly_prop + method buffered : timeRanges t readonly_prop - method controls : bool t prop + method controls : bool t prop - method currentSrc : js_string t readonly_prop + method currentSrc : js_string t readonly_prop - method currentTime : float prop + method currentTime : float prop - method duration : float readonly_prop + method duration : float readonly_prop - method ended : bool t readonly_prop + method ended : bool t readonly_prop - method loop : bool t prop + method loop : bool t prop - method mediagroup : js_string t prop + method mediagroup : js_string t prop - method muted : bool t prop + method muted : bool t prop - method networkState_int : int readonly_prop + method networkState_int : int readonly_prop - method networkState : networkState readonly_prop + method networkState : networkState readonly_prop - method paused : bool t readonly_prop + method paused : bool t readonly_prop - method playbackRate : float prop + method playbackRate : float prop - method played : timeRanges t readonly_prop + method played : timeRanges t readonly_prop - method preload : js_string t prop + method preload : js_string t prop - method readyState_int : int readonly_prop + method readyState_int : int readonly_prop - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method seekable : timeRanges t readonly_prop + method seekable : timeRanges t readonly_prop - method seeking : bool t readonly_prop + method seeking : bool t readonly_prop - method src : js_string t prop + method src : js_string t prop - method volume : float prop + method volume : float prop - method oncanplay : ('self t, mediaEvent t) event_listener writeonly_prop + method oncanplay : ('self t, mediaEvent t) event_listener writeonly_prop - method oncanplaythrough : ('self t, mediaEvent t) event_listener writeonly_prop + method oncanplaythrough : ('self t, mediaEvent t) event_listener writeonly_prop - method ondurationchange : ('self t, mediaEvent t) event_listener writeonly_prop + method ondurationchange : ('self t, mediaEvent t) event_listener writeonly_prop - method onemptied : ('self t, mediaEvent t) event_listener writeonly_prop + method onemptied : ('self t, mediaEvent t) event_listener writeonly_prop - method onended : ('self t, mediaEvent t) event_listener writeonly_prop + method onended : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadeddata : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadeddata : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadedmetadata : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadedmetadata : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadstart : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadstart : ('self t, mediaEvent t) event_listener writeonly_prop - method onpause : ('self t, mediaEvent t) event_listener writeonly_prop + method onpause : ('self t, mediaEvent t) event_listener writeonly_prop - method onplay : ('self t, mediaEvent t) event_listener writeonly_prop + method onplay : ('self t, mediaEvent t) event_listener writeonly_prop - method onplaying : ('self t, mediaEvent t) event_listener writeonly_prop + method onplaying : ('self t, mediaEvent t) event_listener writeonly_prop - method onratechange : ('self t, mediaEvent t) event_listener writeonly_prop + method onratechange : ('self t, mediaEvent t) event_listener writeonly_prop - method onseeked : ('self t, mediaEvent t) event_listener writeonly_prop + method onseeked : ('self t, mediaEvent t) event_listener writeonly_prop - method onseeking : ('self t, mediaEvent t) event_listener writeonly_prop + method onseeking : ('self t, mediaEvent t) event_listener writeonly_prop - method onstalled : ('self t, mediaEvent t) event_listener writeonly_prop + method onstalled : ('self t, mediaEvent t) event_listener writeonly_prop - method onsuspend : ('self t, mediaEvent t) event_listener writeonly_prop + method onsuspend : ('self t, mediaEvent t) event_listener writeonly_prop - method onvolumechange : ('self t, mediaEvent t) event_listener writeonly_prop + method onvolumechange : ('self t, mediaEvent t) event_listener writeonly_prop - method onwaiting : ('self t, mediaEvent t) event_listener writeonly_prop - end + method onwaiting : ('self t, mediaEvent t) event_listener writeonly_prop +end -class type audioElement = - object - inherit mediaElement - end +class type audioElement = object + inherit mediaElement +end -class type videoElement = - object - inherit mediaElement - end +class type videoElement = object + inherit mediaElement +end type context = js_string t @@ -1799,371 +1732,360 @@ let _2d_ = Js.string "2d" type canvasPattern -class type canvasElement = - object - inherit element +class type canvasElement = object + inherit element - method width : int prop + method width : int prop - method height : int prop + method height : int prop - method toDataURL : js_string t meth + method toDataURL : js_string t meth - method toDataURL_type : js_string t -> js_string t meth + method toDataURL_type : js_string t -> js_string t meth - method toDataURL_type_compression : js_string t -> float -> js_string t meth + method toDataURL_type_compression : js_string t -> float -> js_string t meth - method getContext : js_string t -> canvasRenderingContext2D t meth - end + method getContext : js_string t -> canvasRenderingContext2D t meth +end -and canvasRenderingContext2D = - object - method canvas : canvasElement t readonly_prop +and canvasRenderingContext2D = object + method canvas : canvasElement t readonly_prop - method save : unit meth + method save : unit meth - method restore : unit meth + method restore : unit meth - method scale : float -> float -> unit meth + method scale : float -> float -> unit meth - method rotate : float -> unit meth + method rotate : float -> unit meth - method translate : float -> float -> unit meth + method translate : float -> float -> unit meth - method transform : float -> float -> float -> float -> float -> float -> unit meth + method transform : float -> float -> float -> float -> float -> float -> unit meth - method setTransform : float -> float -> float -> float -> float -> float -> unit meth + method setTransform : float -> float -> float -> float -> float -> float -> unit meth - method globalAlpha : float prop + method globalAlpha : float prop - method globalCompositeOperation : js_string t prop + method globalCompositeOperation : js_string t prop - method strokeStyle : js_string t writeonly_prop + method strokeStyle : js_string t writeonly_prop - method strokeStyle_gradient : canvasGradient t writeonly_prop + method strokeStyle_gradient : canvasGradient t writeonly_prop - method strokeStyle_pattern : canvasPattern t writeonly_prop + method strokeStyle_pattern : canvasPattern t writeonly_prop - method fillStyle : js_string t writeonly_prop + method fillStyle : js_string t writeonly_prop - method fillStyle_gradient : canvasGradient t writeonly_prop + method fillStyle_gradient : canvasGradient t writeonly_prop - method fillStyle_pattern : canvasPattern t writeonly_prop + method fillStyle_pattern : canvasPattern t writeonly_prop - method createLinearGradient : - float -> float -> float -> float -> canvasGradient t meth + method createLinearGradient : float -> float -> float -> float -> canvasGradient t meth - method createRadialGradient : - float -> float -> float -> float -> float -> float -> canvasGradient t meth + method createRadialGradient : + float -> float -> float -> float -> float -> float -> canvasGradient t meth - method createPattern : imageElement t -> js_string t -> canvasPattern t meth + method createPattern : imageElement t -> js_string t -> canvasPattern t meth - method createPattern_fromCanvas : - canvasElement t -> js_string t -> canvasPattern t meth + method createPattern_fromCanvas : canvasElement t -> js_string t -> canvasPattern t meth - method createPattern_fromVideo : videoElement t -> js_string t -> canvasPattern t meth + method createPattern_fromVideo : videoElement t -> js_string t -> canvasPattern t meth - method lineWidth : float prop + method lineWidth : float prop - method lineCap : js_string t prop + method lineCap : js_string t prop - method lineJoin : js_string t prop + method lineJoin : js_string t prop - method miterLimit : float prop + method miterLimit : float prop - method shadowOffsetX : float prop + method shadowOffsetX : float prop - method shadowOffsetY : float prop + method shadowOffsetY : float prop - method shadowBlur : float prop + method shadowBlur : float prop - method shadowColor : js_string t prop + method shadowColor : js_string t prop - method clearRect : float -> float -> float -> float -> unit meth + method clearRect : float -> float -> float -> float -> unit meth - method fillRect : float -> float -> float -> float -> unit meth + method fillRect : float -> float -> float -> float -> unit meth - method strokeRect : float -> float -> float -> float -> unit meth + method strokeRect : float -> float -> float -> float -> unit meth - method beginPath : unit meth + method beginPath : unit meth - method closePath : unit meth + method closePath : unit meth - method moveTo : float -> float -> unit meth + method moveTo : float -> float -> unit meth - method lineTo : float -> float -> unit meth + method lineTo : float -> float -> unit meth - method quadraticCurveTo : float -> float -> float -> float -> unit meth + method quadraticCurveTo : float -> float -> float -> float -> unit meth - method bezierCurveTo : float -> float -> float -> float -> float -> float -> unit meth + method bezierCurveTo : float -> float -> float -> float -> float -> float -> unit meth - method arcTo : float -> float -> float -> float -> float -> unit meth + method arcTo : float -> float -> float -> float -> float -> unit meth - method rect : float -> float -> float -> float -> unit meth + method rect : float -> float -> float -> float -> unit meth - method arc : float -> float -> float -> float -> float -> bool t -> unit meth + method arc : float -> float -> float -> float -> float -> bool t -> unit meth - method fill : unit meth + method fill : unit meth - method stroke : unit meth + method stroke : unit meth - method clip : unit meth + method clip : unit meth - method isPointInPath : float -> float -> bool t meth + method isPointInPath : float -> float -> bool t meth - method drawFocusRing : #element t -> float -> float -> bool t -> bool t meth + method drawFocusRing : #element t -> float -> float -> bool t -> bool t meth - method font : js_string t prop + method font : js_string t prop - method textAlign : js_string t prop + method textAlign : js_string t prop - method textBaseline : js_string t prop + method textBaseline : js_string t prop - method fillText : js_string t -> float -> float -> unit meth + method fillText : js_string t -> float -> float -> unit meth - method fillText_withWidth : js_string t -> float -> float -> float -> unit meth + method fillText_withWidth : js_string t -> float -> float -> float -> unit meth - method strokeText : js_string t -> float -> float -> unit meth + method strokeText : js_string t -> float -> float -> unit meth - method strokeText_withWidth : js_string t -> float -> float -> float -> unit meth + method strokeText_withWidth : js_string t -> float -> float -> float -> unit meth - method measureText : js_string t -> textMetrics t meth + method measureText : js_string t -> textMetrics t meth - method drawImage : imageElement t -> float -> float -> unit meth + method drawImage : imageElement t -> float -> float -> unit meth - method drawImage_withSize : - imageElement t -> float -> float -> float -> float -> unit meth + method drawImage_withSize : + imageElement t -> float -> float -> float -> float -> unit meth - method drawImage_full : - imageElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_full : + imageElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - method drawImage_fromCanvas : canvasElement t -> float -> float -> unit meth + method drawImage_fromCanvas : canvasElement t -> float -> float -> unit meth - method drawImage_fromCanvasWithSize : - canvasElement t -> float -> float -> float -> float -> unit meth + method drawImage_fromCanvasWithSize : + canvasElement t -> float -> float -> float -> float -> unit meth - method drawImage_fullFromCanvas : - canvasElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_fullFromCanvas : + canvasElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - method drawImage_fromVideoWithVideo : videoElement t -> float -> float -> unit meth + method drawImage_fromVideoWithVideo : videoElement t -> float -> float -> unit meth - method drawImage_fromVideoWithSize : - videoElement t -> float -> float -> float -> float -> unit meth + method drawImage_fromVideoWithSize : + videoElement t -> float -> float -> float -> float -> unit meth - method drawImage_fullFromVideo : - videoElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_fullFromVideo : + videoElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - method createImageData : int -> int -> imageData t meth + method createImageData : int -> int -> imageData t meth - method getImageData : float -> float -> float -> float -> imageData t meth + method getImageData : float -> float -> float -> float -> imageData t meth - method putImageData : imageData t -> float -> float -> unit meth - end + method putImageData : imageData t -> float -> float -> unit meth +end -and canvasGradient = - object - method addColorStop : float -> js_string t -> unit meth - end +and canvasGradient = object + method addColorStop : float -> js_string t -> unit meth +end -and textMetrics = - object - method width : float readonly_prop - end +and textMetrics = object + method width : float readonly_prop +end -and imageData = - object - method width : int readonly_prop +and imageData = object + method width : int readonly_prop - method height : int readonly_prop + method height : int readonly_prop - method data : canvasPixelArray t readonly_prop - end + method data : canvasPixelArray t readonly_prop +end -and canvasPixelArray = - object - method length : int readonly_prop - end +and canvasPixelArray = object + method length : int readonly_prop +end external pixel_get : canvasPixelArray t -> int -> int = "caml_js_get" external pixel_set : canvasPixelArray t -> int -> int -> unit = "caml_js_set" -class type range = - object - method collapsed : bool t readonly_prop +class type range = object + method collapsed : bool t readonly_prop - method startOffset : int readonly_prop + method startOffset : int readonly_prop - method endOffset : int readonly_prop + method endOffset : int readonly_prop - method startContainer : Dom.node t readonly_prop + method startContainer : Dom.node t readonly_prop - method endContainer : Dom.node t readonly_prop + method endContainer : Dom.node t readonly_prop - method setStart : Dom.node t -> int -> unit meth + method setStart : Dom.node t -> int -> unit meth - method setEnd : Dom.node t -> int -> unit meth + method setEnd : Dom.node t -> int -> unit meth - method setStartBefore : Dom.node t -> unit meth + method setStartBefore : Dom.node t -> unit meth - method setEndBefore : Dom.node t -> unit meth + method setEndBefore : Dom.node t -> unit meth - method setStartAfter : Dom.node t -> unit meth + method setStartAfter : Dom.node t -> unit meth - method setEndAfter : Dom.node t -> unit meth + method setEndAfter : Dom.node t -> unit meth - method selectNode : Dom.node t -> unit meth + method selectNode : Dom.node t -> unit meth - method selectNodeContents : Dom.node t -> unit meth + method selectNodeContents : Dom.node t -> unit meth - method collapse : bool t -> unit meth + method collapse : bool t -> unit meth - method cloneContents : Dom.documentFragment t meth + method cloneContents : Dom.documentFragment t meth - method extractContents : Dom.documentFragment t meth + method extractContents : Dom.documentFragment t meth - method deleteContents : unit meth + method deleteContents : unit meth - method insertNode : Dom.node t -> unit meth + method insertNode : Dom.node t -> unit meth - method surroundContents : Dom.node t -> unit meth + method surroundContents : Dom.node t -> unit meth - method cloneRange : range t meth + method cloneRange : range t meth - method toString : js_string t meth - end + method toString : js_string t meth +end (** Information on current selection *) -class type selection = - object - method anchorNode : Dom.node t readonly_prop +class type selection = object + method anchorNode : Dom.node t readonly_prop - method anchorOffset : int readonly_prop + method anchorOffset : int readonly_prop - method focusNode : Dom.node t readonly_prop + method focusNode : Dom.node t readonly_prop - method focusOffset : int readonly_prop + method focusOffset : int readonly_prop - method isCollapsed : bool t readonly_prop + method isCollapsed : bool t readonly_prop - method rangeCount : int readonly_prop + method rangeCount : int readonly_prop - method getRangeAt : int -> range t meth + method getRangeAt : int -> range t meth - method collapse : bool t -> unit meth + method collapse : bool t -> unit meth - method extend : Dom.node t -> int -> unit meth + method extend : Dom.node t -> int -> unit meth - method modify : js_string t -> js_string t -> js_string t -> unit meth + method modify : js_string t -> js_string t -> js_string t -> unit meth - method collapseToStart : unit meth + method collapseToStart : unit meth - method collapseToEnd : unit meth + method collapseToEnd : unit meth - method selectAllChildren : Dom.node t -> unit meth + method selectAllChildren : Dom.node t -> unit meth - method addRange : range t -> unit meth + method addRange : range t -> unit meth - method removeRange : range t -> unit meth + method removeRange : range t -> unit meth - method removeAllRanges : unit meth + method removeAllRanges : unit meth - method deleteFromDocument : unit meth + method deleteFromDocument : unit meth - method containsNode : Dom.node t -> bool t -> bool t meth + method containsNode : Dom.node t -> bool t -> bool t meth - method toString : js_string t meth - end + method toString : js_string t meth +end -class type document = - object - inherit [element] Dom.document +class type document = object + inherit [element] Dom.document - inherit nodeSelector + inherit nodeSelector - inherit eventTarget + inherit eventTarget - method title : js_string t prop + method title : js_string t prop - method referrer : js_string t readonly_prop + method referrer : js_string t readonly_prop - method domain : js_string t prop + method domain : js_string t prop - method _URL : js_string t readonly_prop + method _URL : js_string t readonly_prop - method head : headElement t prop + method head : headElement t prop - method body : bodyElement t prop + method body : bodyElement t prop - method documentElement : htmlElement t readonly_prop + method documentElement : htmlElement t readonly_prop - method images : imageElement collection t readonly_prop + method images : imageElement collection t readonly_prop - method applets : element collection t readonly_prop + method applets : element collection t readonly_prop - method links : element collection t readonly_prop + method links : element collection t readonly_prop - method forms : formElement collection t readonly_prop + method forms : formElement collection t readonly_prop - method anchors : element collection t readonly_prop + method anchors : element collection t readonly_prop - method cookie : js_string t prop + method cookie : js_string t prop - method designMode : js_string t prop + method designMode : js_string t prop - method open_ : unit meth + method open_ : unit meth - method close : unit meth + method close : unit meth - method write : js_string t -> unit meth + method write : js_string t -> unit meth - method execCommand : js_string t -> bool t -> js_string t opt -> unit meth + method execCommand : js_string t -> bool t -> js_string t opt -> unit meth - method createRange : range t meth + method createRange : range t meth - method readyState : js_string t readonly_prop + method readyState : js_string t readonly_prop - method getElementsByClassName : js_string t -> element Dom.nodeList t meth + method getElementsByClassName : js_string t -> element Dom.nodeList t meth - method getElementsByName : js_string t -> element Dom.nodeList t meth + method getElementsByName : js_string t -> element Dom.nodeList t meth - method activeElement : element t opt readonly_prop + method activeElement : element t opt readonly_prop - method hidden : bool t readonly_prop + method hidden : bool t readonly_prop - method onfullscreenchange : (document t, event t) event_listener writeonly_prop + method onfullscreenchange : (document t, event t) event_listener writeonly_prop - method onwebkitfullscreenchange : (document t, event t) event_listener writeonly_prop + method onwebkitfullscreenchange : (document t, event t) event_listener writeonly_prop - inherit eventTarget - end + inherit eventTarget +end type interval_id @@ -2171,32 +2093,31 @@ type timeout_id type animation_frame_request_id -class type location = - object - method href : js_string t prop +class type location = object + method href : js_string t prop - method protocol : js_string t prop + method protocol : js_string t prop - method host : js_string t prop + method host : js_string t prop - method hostname : js_string t prop + method hostname : js_string t prop - method origin : js_string t optdef readonly_prop + method origin : js_string t optdef readonly_prop - method port : js_string t prop + method port : js_string t prop - method pathname : js_string t prop + method pathname : js_string t prop - method search : js_string t prop + method search : js_string t prop - method hash : js_string t prop + method hash : js_string t prop - method assign : js_string t -> unit meth + method assign : js_string t -> unit meth - method replace : js_string t -> unit meth + method replace : js_string t -> unit meth - method reload : unit meth - end + method reload : unit meth +end let location_origin (loc : location t) = Optdef.case @@ -2212,209 +2133,203 @@ let location_origin (loc : location t) = if port##.length > 0 then origin##concat_2 (Js.string ":") loc##.port else origin) (fun o -> o) -class type history = - object - method length : int readonly_prop +class type history = object + method length : int readonly_prop - method state : Js.Unsafe.any readonly_prop + method state : Js.Unsafe.any readonly_prop - method go : int opt -> unit meth + method go : int opt -> unit meth - method back : unit meth + method back : unit meth - method forward : unit meth + method forward : unit meth - method pushState : 'a. 'a -> js_string t -> js_string t opt -> unit meth + method pushState : 'a. 'a -> js_string t -> js_string t opt -> unit meth - method replaceState : 'a. 'a -> js_string t -> js_string t opt -> unit meth - end + method replaceState : 'a. 'a -> js_string t -> js_string t opt -> unit meth +end class type undoManager = object end -class type navigator = - object - method appCodeName : js_string t readonly_prop +class type navigator = object + method appCodeName : js_string t readonly_prop - method appName : js_string t readonly_prop + method appName : js_string t readonly_prop - method appVersion : js_string t readonly_prop + method appVersion : js_string t readonly_prop - method cookieEnabled : bool t readonly_prop + method cookieEnabled : bool t readonly_prop - method onLine : bool t readonly_prop + method onLine : bool t readonly_prop - method platform : js_string t readonly_prop + method platform : js_string t readonly_prop - method vendor : js_string t readonly_prop + method vendor : js_string t readonly_prop - method userAgent : js_string t readonly_prop + method userAgent : js_string t readonly_prop - method language : js_string t optdef readonly_prop + method language : js_string t optdef readonly_prop - method userLanguage : js_string t optdef readonly_prop + method userLanguage : js_string t optdef readonly_prop - method maxTouchPoints : int readonly_prop - end + method maxTouchPoints : int readonly_prop +end -class type screen = - object - method width : int readonly_prop +class type screen = object + method width : int readonly_prop - method height : int readonly_prop + method height : int readonly_prop - method availWidth : int readonly_prop + method availWidth : int readonly_prop - method availHeight : int readonly_prop - end + method availHeight : int readonly_prop +end -class type applicationCache = - object - method status : int readonly_prop +class type applicationCache = object + method status : int readonly_prop - method update : unit meth + method update : unit meth - method abort : unit meth + method abort : unit meth - method swapCache : unit meth + method swapCache : unit meth - method onchecking : (applicationCache t, event t) event_listener prop + method onchecking : (applicationCache t, event t) event_listener prop - method onerror : (applicationCache t, event t) event_listener prop + method onerror : (applicationCache t, event t) event_listener prop - method onnoupdate : (applicationCache t, event t) event_listener prop + method onnoupdate : (applicationCache t, event t) event_listener prop - method ondownloading : (applicationCache t, event t) event_listener prop + method ondownloading : (applicationCache t, event t) event_listener prop - method onprogress : (applicationCache t, event t) event_listener prop + method onprogress : (applicationCache t, event t) event_listener prop - method onupdateready : (applicationCache t, event t) event_listener prop + method onupdateready : (applicationCache t, event t) event_listener prop - method oncached : (applicationCache t, event t) event_listener prop + method oncached : (applicationCache t, event t) event_listener prop - method onobsolete : (applicationCache t, event t) event_listener prop + method onobsolete : (applicationCache t, event t) event_listener prop - inherit eventTarget - end + inherit eventTarget +end -class type _URL = - object - method createObjectURL : #File.blob t -> js_string t meth +class type _URL = object + method createObjectURL : #File.blob t -> js_string t meth - method revokeObjectURL : js_string t -> unit meth - end + method revokeObjectURL : js_string t -> unit meth +end -class type window = - object - inherit eventTarget +class type window = object + inherit eventTarget - method document : document t readonly_prop + method document : document t readonly_prop - method applicationCache : applicationCache t readonly_prop + method applicationCache : applicationCache t readonly_prop - method name : js_string t prop + method name : js_string t prop - method location : location t readonly_prop + method location : location t readonly_prop - method history : history t readonly_prop + method history : history t readonly_prop - method undoManager : undoManager t readonly_prop + method undoManager : undoManager t readonly_prop - method navigator : navigator t readonly_prop + method navigator : navigator t readonly_prop - method getSelection : selection t meth + method getSelection : selection t meth - method close : unit meth + method close : unit meth - method closed : bool t readonly_prop + method closed : bool t readonly_prop - method stop : unit meth + method stop : unit meth - method focus : unit meth + method focus : unit meth - method blur : unit meth + method blur : unit meth - method scroll : int -> int -> unit meth + method scroll : int -> int -> unit meth - method scrollBy : int -> int -> unit meth + method scrollBy : int -> int -> unit meth - method sessionStorage : storage t optdef readonly_prop + method sessionStorage : storage t optdef readonly_prop - method localStorage : storage t optdef readonly_prop + method localStorage : storage t optdef readonly_prop - method top : window t readonly_prop + method top : window t readonly_prop - method parent : window t readonly_prop + method parent : window t readonly_prop - method frameElement : element t opt readonly_prop + method frameElement : element t opt readonly_prop - method open_ : js_string t -> js_string t -> js_string t opt -> window t opt meth + method open_ : js_string t -> js_string t -> js_string t opt -> window t opt meth - method alert : js_string t -> unit meth + method alert : js_string t -> unit meth - method confirm : js_string t -> bool t meth + method confirm : js_string t -> bool t meth - method prompt : js_string t -> js_string t -> js_string t opt meth + method prompt : js_string t -> js_string t -> js_string t opt meth - method print : unit meth + method print : unit meth - method setInterval : (unit -> unit) Js.callback -> float -> interval_id meth + method setInterval : (unit -> unit) Js.callback -> float -> interval_id meth - method clearInterval : interval_id -> unit meth + method clearInterval : interval_id -> unit meth - method setTimeout : (unit -> unit) Js.callback -> float -> timeout_id meth + method setTimeout : (unit -> unit) Js.callback -> float -> timeout_id meth - method clearTimeout : timeout_id -> unit meth + method clearTimeout : timeout_id -> unit meth - method requestAnimationFrame : - (float -> unit) Js.callback -> animation_frame_request_id meth + method requestAnimationFrame : + (float -> unit) Js.callback -> animation_frame_request_id meth - method cancelAnimationFrame : animation_frame_request_id -> unit meth + method cancelAnimationFrame : animation_frame_request_id -> unit meth - method screen : screen t readonly_prop + method screen : screen t readonly_prop - method innerWidth : int readonly_prop + method innerWidth : int readonly_prop - method innerHeight : int readonly_prop + method innerHeight : int readonly_prop - method outerWidth : int readonly_prop + method outerWidth : int readonly_prop - method outerHeight : int readonly_prop + method outerHeight : int readonly_prop - method getComputedStyle : #element t -> cssStyleDeclaration t meth + method getComputedStyle : #element t -> cssStyleDeclaration t meth - method getComputedStyle_pseudoElt : - #element t -> js_string t -> cssStyleDeclaration t meth + method getComputedStyle_pseudoElt : + #element t -> js_string t -> cssStyleDeclaration t meth - method atob : js_string t -> js_string t meth + method atob : js_string t -> js_string t meth - method btoa : js_string t -> js_string t meth + method btoa : js_string t -> js_string t meth - method onload : (window t, event t) event_listener prop + method onload : (window t, event t) event_listener prop - method onunload : (window t, event t) event_listener prop + method onunload : (window t, event t) event_listener prop - method onbeforeunload : (window t, event t) event_listener prop + method onbeforeunload : (window t, event t) event_listener prop - method onblur : (window t, focusEvent t) event_listener prop + method onblur : (window t, focusEvent t) event_listener prop - method onfocus : (window t, focusEvent t) event_listener prop + method onfocus : (window t, focusEvent t) event_listener prop - method onresize : (window t, event t) event_listener prop + method onresize : (window t, event t) event_listener prop - method onorientationchange : (window t, event t) event_listener prop + method onorientationchange : (window t, event t) event_listener prop - method onpopstate : (window t, popStateEvent t) event_listener prop + method onpopstate : (window t, popStateEvent t) event_listener prop - method onhashchange : (window t, hashChangeEvent t) event_listener prop + method onhashchange : (window t, hashChangeEvent t) event_listener prop - method ononline : (window t, event t) event_listener writeonly_prop + method ononline : (window t, event t) event_listener writeonly_prop - method onoffline : (window t, event t) event_listener writeonly_prop + method onoffline : (window t, event t) event_listener writeonly_prop - method _URL : _URL t readonly_prop + method _URL : _URL t readonly_prop - method devicePixelRatio : float readonly_prop - end + method devicePixelRatio : float readonly_prop +end let window : window t = Js.Unsafe.global @@ -2444,64 +2359,61 @@ let getElementById_coerce id coerce = (****) -class type frameSetElement = - object - inherit element +class type frameSetElement = object + inherit element - method cols : js_string t prop + method cols : js_string t prop - method rows : js_string t prop - end + method rows : js_string t prop +end -class type frameElement = - object - inherit element +class type frameElement = object + inherit element - method frameBorder : js_string t prop + method frameBorder : js_string t prop - method longDesc : js_string t prop + method longDesc : js_string t prop - method marginHeight : js_string t prop + method marginHeight : js_string t prop - method marginWidth : js_string t prop + method marginWidth : js_string t prop - method name : js_string t prop + method name : js_string t prop - method noResize : bool t prop + method noResize : bool t prop - method scrolling : js_string t prop + method scrolling : js_string t prop - method src : js_string t prop + method src : js_string t prop - method contentDocument : document t opt readonly_prop - end + method contentDocument : document t opt readonly_prop +end -class type iFrameElement = - object - inherit element +class type iFrameElement = object + inherit element - method frameBorder : js_string t prop + method frameBorder : js_string t prop - method height : js_string t prop + method height : js_string t prop - method width : js_string t prop + method width : js_string t prop - method longDesc : js_string t prop + method longDesc : js_string t prop - method marginHeight : js_string t prop + method marginHeight : js_string t prop - method marginWidth : js_string t prop + method marginWidth : js_string t prop - method name : js_string t prop + method name : js_string t prop - method scrolling : js_string t prop + method scrolling : js_string t prop - method src : js_string t prop + method src : js_string t prop - method contentDocument : document t opt readonly_prop + method contentDocument : document t opt readonly_prop - method contentWindow : window t readonly_prop - end + method contentWindow : window t readonly_prop +end (****) diff --git a/lib/js_of_ocaml/dom_html.mli b/lib/js_of_ocaml/dom_html.mli index c42c44cfe7..68f646d24f 100644 --- a/lib/js_of_ocaml/dom_html.mli +++ b/lib/js_of_ocaml/dom_html.mli @@ -27,240 +27,239 @@ open Js (** {2 CSS style declaration} *) -class type cssStyleDeclaration = - object - method setProperty : - js_string t -> js_string t -> js_string t optdef -> js_string t meth +class type cssStyleDeclaration = object + method setProperty : + js_string t -> js_string t -> js_string t optdef -> js_string t meth - method getPropertyValue : js_string t -> js_string t meth + method getPropertyValue : js_string t -> js_string t meth - method getPropertyPriority : js_string t -> js_string t meth + method getPropertyPriority : js_string t -> js_string t meth - method removeProperty : js_string t -> js_string t meth + method removeProperty : js_string t -> js_string t meth - method animation : js_string t prop + method animation : js_string t prop - method animationDelay : js_string t prop + method animationDelay : js_string t prop - method animationDirection : js_string t prop + method animationDirection : js_string t prop - method animationDuration : js_string t prop + method animationDuration : js_string t prop - method animationFillMode : js_string t prop + method animationFillMode : js_string t prop - method animationIterationCount : js_string t prop + method animationIterationCount : js_string t prop - method animationName : js_string t prop + method animationName : js_string t prop - method animationPlayState : js_string t prop + method animationPlayState : js_string t prop - method animationTimingFunction : js_string t prop + method animationTimingFunction : js_string t prop - method background : js_string t prop + method background : js_string t prop - method backgroundAttachment : js_string t prop + method backgroundAttachment : js_string t prop - method backgroundColor : js_string t prop + method backgroundColor : js_string t prop - method backgroundImage : js_string t prop + method backgroundImage : js_string t prop - method backgroundPosition : js_string t prop + method backgroundPosition : js_string t prop - method backgroundRepeat : js_string t prop + method backgroundRepeat : js_string t prop - method border : js_string t prop + method border : js_string t prop - method borderBottom : js_string t prop + method borderBottom : js_string t prop - method borderBottomColor : js_string t prop + method borderBottomColor : js_string t prop - method borderBottomStyle : js_string t prop + method borderBottomStyle : js_string t prop - method borderBottomWidth : js_string t prop + method borderBottomWidth : js_string t prop - method borderCollapse : js_string t prop + method borderCollapse : js_string t prop - method borderColor : js_string t prop + method borderColor : js_string t prop - method borderLeft : js_string t prop + method borderLeft : js_string t prop - method borderLeftColor : js_string t prop + method borderLeftColor : js_string t prop - method borderLeftStyle : js_string t prop + method borderLeftStyle : js_string t prop - method borderLeftWidth : js_string t prop + method borderLeftWidth : js_string t prop - method borderRadius : js_string t prop + method borderRadius : js_string t prop - method borderRight : js_string t prop + method borderRight : js_string t prop - method borderRightColor : js_string t prop + method borderRightColor : js_string t prop - method borderRightStyle : js_string t prop + method borderRightStyle : js_string t prop - method borderRightWidth : js_string t prop + method borderRightWidth : js_string t prop - method borderSpacing : js_string t prop + method borderSpacing : js_string t prop - method borderStyle : js_string t prop + method borderStyle : js_string t prop - method borderTop : js_string t prop + method borderTop : js_string t prop - method borderTopColor : js_string t prop + method borderTopColor : js_string t prop - method borderTopStyle : js_string t prop + method borderTopStyle : js_string t prop - method borderTopWidth : js_string t prop + method borderTopWidth : js_string t prop - method borderWidth : js_string t prop + method borderWidth : js_string t prop - method bottom : js_string t prop + method bottom : js_string t prop - method captionSide : js_string t prop + method captionSide : js_string t prop - method clear : js_string t prop + method clear : js_string t prop - method clip : js_string t prop + method clip : js_string t prop - method color : js_string t prop + method color : js_string t prop - method content : js_string t prop + method content : js_string t prop - method counterIncrement : js_string t prop + method counterIncrement : js_string t prop - method counterReset : js_string t prop + method counterReset : js_string t prop - method cssFloat : js_string t prop + method cssFloat : js_string t prop - method cssText : js_string t prop + method cssText : js_string t prop - method cursor : js_string t prop + method cursor : js_string t prop - method direction : js_string t prop + method direction : js_string t prop - method display : js_string t prop + method display : js_string t prop - method emptyCells : js_string t prop + method emptyCells : js_string t prop - method fill : js_string t prop + method fill : js_string t prop - method font : js_string t prop + method font : js_string t prop - method fontFamily : js_string t prop + method fontFamily : js_string t prop - method fontSize : js_string t prop + method fontSize : js_string t prop - method fontStyle : js_string t prop + method fontStyle : js_string t prop - method fontVariant : js_string t prop + method fontVariant : js_string t prop - method fontWeight : js_string t prop + method fontWeight : js_string t prop - method height : js_string t prop + method height : js_string t prop - method left : js_string t prop + method left : js_string t prop - method letterSpacing : js_string t prop + method letterSpacing : js_string t prop - method lineHeight : js_string t prop + method lineHeight : js_string t prop - method listStyle : js_string t prop + method listStyle : js_string t prop - method listStyleImage : js_string t prop + method listStyleImage : js_string t prop - method listStylePosition : js_string t prop + method listStylePosition : js_string t prop - method listStyleType : js_string t prop + method listStyleType : js_string t prop - method margin : js_string t prop + method margin : js_string t prop - method marginBottom : js_string t prop + method marginBottom : js_string t prop - method marginLeft : js_string t prop + method marginLeft : js_string t prop - method marginRight : js_string t prop + method marginRight : js_string t prop - method marginTop : js_string t prop + method marginTop : js_string t prop - method maxHeight : js_string t prop + method maxHeight : js_string t prop - method maxWidth : js_string t prop + method maxWidth : js_string t prop - method minHeight : js_string t prop + method minHeight : js_string t prop - method minWidth : js_string t prop + method minWidth : js_string t prop - method opacity : js_string t optdef prop + method opacity : js_string t optdef prop - method outline : js_string t prop + method outline : js_string t prop - method outlineColor : js_string t prop + method outlineColor : js_string t prop - method outlineOffset : js_string t prop + method outlineOffset : js_string t prop - method outlineStyle : js_string t prop + method outlineStyle : js_string t prop - method outlineWidth : js_string t prop + method outlineWidth : js_string t prop - method overflow : js_string t prop + method overflow : js_string t prop - method overflowX : js_string t prop + method overflowX : js_string t prop - method overflowY : js_string t prop + method overflowY : js_string t prop - method padding : js_string t prop + method padding : js_string t prop - method paddingBottom : js_string t prop + method paddingBottom : js_string t prop - method paddingLeft : js_string t prop + method paddingLeft : js_string t prop - method paddingRight : js_string t prop + method paddingRight : js_string t prop - method paddingTop : js_string t prop + method paddingTop : js_string t prop - method pageBreakAfter : js_string t prop + method pageBreakAfter : js_string t prop - method pageBreakBefore : js_string t prop + method pageBreakBefore : js_string t prop - method pointerEvents : js_string t prop + method pointerEvents : js_string t prop - (* SVG-only on many browsers *) - method position : js_string t prop + (* SVG-only on many browsers *) + method position : js_string t prop - method right : js_string t prop + method right : js_string t prop - method stroke : js_string t prop + method stroke : js_string t prop - method strokeWidth : js_string t prop + method strokeWidth : js_string t prop - method tableLayout : js_string t prop + method tableLayout : js_string t prop - method textAlign : js_string t prop + method textAlign : js_string t prop - method textAnchor : js_string t prop + method textAnchor : js_string t prop - method textDecoration : js_string t prop + method textDecoration : js_string t prop - method textIndent : js_string t prop + method textIndent : js_string t prop - method textTransform : js_string t prop + method textTransform : js_string t prop - method top : js_string t prop + method top : js_string t prop - method transform : js_string t prop + method transform : js_string t prop - method verticalAlign : js_string t prop + method verticalAlign : js_string t prop - method visibility : js_string t prop + method visibility : js_string t prop - method whiteSpace : js_string t prop + method whiteSpace : js_string t prop - method width : js_string t prop + method width : js_string t prop - method wordSpacing : js_string t prop + method wordSpacing : js_string t prop - method zIndex : js_string t prop - end + method zIndex : js_string t prop +end (** {2 Events} *) @@ -280,879 +279,832 @@ type delta_mode = | Delta_line | Delta_page -class type event = - object - inherit [element] Dom.event - end +class type event = object + inherit [element] Dom.event +end -and ['a] customEvent = - object - inherit [element, 'a] Dom.customEvent - end +and ['a] customEvent = object + inherit [element, 'a] Dom.customEvent +end -and focusEvent = - object - inherit event +and focusEvent = object + inherit event - method relatedTarget : element t opt optdef readonly_prop - end + method relatedTarget : element t opt optdef readonly_prop +end -and mouseEvent = - object - inherit event +and mouseEvent = object + inherit event - method relatedTarget : element t opt optdef readonly_prop + method relatedTarget : element t opt optdef readonly_prop - (* Relative to viewport *) - method clientX : int readonly_prop + (* Relative to viewport *) + method clientX : int readonly_prop - method clientY : int readonly_prop + method clientY : int readonly_prop - (* Relative to the edge of the screen *) - method screenX : int readonly_prop + (* Relative to the edge of the screen *) + method screenX : int readonly_prop - method screenY : int readonly_prop + method screenY : int readonly_prop - method offsetX : int readonly_prop + method offsetX : int readonly_prop - method offsetY : int readonly_prop + method offsetY : int readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method which : mouse_button optdef readonly_prop + method which : mouse_button optdef readonly_prop - (* Legacy methods *) - method button : int readonly_prop + (* Legacy methods *) + method button : int readonly_prop - method fromElement : element t opt optdef readonly_prop + method fromElement : element t opt optdef readonly_prop - method toElement : element t opt optdef readonly_prop + method toElement : element t opt optdef readonly_prop - method pageX : int optdef readonly_prop + method pageX : int optdef readonly_prop - method pageY : int optdef readonly_prop - end + method pageY : int optdef readonly_prop +end -and keyboardEvent = - object - inherit event +and keyboardEvent = object + inherit event - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method location : int readonly_prop + method location : int readonly_prop - (* Standardized but not fully supported properties *) - method key : js_string t optdef readonly_prop + (* Standardized but not fully supported properties *) + method key : js_string t optdef readonly_prop - method code : js_string t optdef readonly_prop + method code : js_string t optdef readonly_prop - (* Deprecated properties *) - method which : int optdef readonly_prop + (* Deprecated properties *) + method which : int optdef readonly_prop - method charCode : int optdef readonly_prop + method charCode : int optdef readonly_prop - method keyCode : int readonly_prop + method keyCode : int readonly_prop - method getModifierState : js_string t -> bool t meth + method getModifierState : js_string t -> bool t meth - method keyIdentifier : js_string t optdef readonly_prop - end + method keyIdentifier : js_string t optdef readonly_prop +end -and mousewheelEvent = - object - (* All modern browsers *) - inherit mouseEvent +and mousewheelEvent = object + (* All modern browsers *) + inherit mouseEvent - method wheelDelta : int readonly_prop + method wheelDelta : int readonly_prop - method wheelDeltaX : int optdef readonly_prop + method wheelDeltaX : int optdef readonly_prop - method wheelDeltaY : int optdef readonly_prop + method wheelDeltaY : int optdef readonly_prop - method deltaX : float readonly_prop + method deltaX : float readonly_prop - method deltaY : float readonly_prop + method deltaY : float readonly_prop - method deltaZ : float readonly_prop + method deltaZ : float readonly_prop - method deltaMode : delta_mode readonly_prop - end + method deltaMode : delta_mode readonly_prop +end -and mouseScrollEvent = - object - (* Firefox *) - inherit mouseEvent +and mouseScrollEvent = object + (* Firefox *) + inherit mouseEvent - method detail : int readonly_prop + method detail : int readonly_prop - method axis : int optdef readonly_prop + method axis : int optdef readonly_prop - method _HORIZONTAL_AXIS : int optdef readonly_prop + method _HORIZONTAL_AXIS : int optdef readonly_prop - method _VERTICAL_AXIS : int optdef readonly_prop - end + method _VERTICAL_AXIS : int optdef readonly_prop +end -and touchEvent = - object - inherit event +and touchEvent = object + inherit event - method touches : touchList t readonly_prop + method touches : touchList t readonly_prop - method targetTouches : touchList t readonly_prop + method targetTouches : touchList t readonly_prop - method changedTouches : touchList t readonly_prop + method changedTouches : touchList t readonly_prop - method ctrlKey : bool t readonly_prop + method ctrlKey : bool t readonly_prop - method shiftKey : bool t readonly_prop + method shiftKey : bool t readonly_prop - method altKey : bool t readonly_prop + method altKey : bool t readonly_prop - method metaKey : bool t readonly_prop + method metaKey : bool t readonly_prop - method relatedTarget : element t opt optdef readonly_prop - end + method relatedTarget : element t opt optdef readonly_prop +end -and touchList = - object - method length : int readonly_prop +and touchList = object + method length : int readonly_prop - method item : int -> touch t optdef meth - end + method item : int -> touch t optdef meth +end -and touch = - object - method identifier : int readonly_prop +and touch = object + method identifier : int readonly_prop - method target : element t optdef readonly_prop + method target : element t optdef readonly_prop - method screenX : int readonly_prop + method screenX : int readonly_prop - method screenY : int readonly_prop + method screenY : int readonly_prop - method clientX : int readonly_prop + method clientX : int readonly_prop - method clientY : int readonly_prop + method clientY : int readonly_prop - method pageX : int readonly_prop + method pageX : int readonly_prop - method pageY : int readonly_prop - end + method pageY : int readonly_prop +end -and submitEvent = - object - inherit event +and submitEvent = object + inherit event - method submitter : element t optdef readonly_prop - end + method submitter : element t optdef readonly_prop +end -and dragEvent = - object - inherit mouseEvent +and dragEvent = object + inherit mouseEvent - method dataTransfer : dataTransfer t readonly_prop - end + method dataTransfer : dataTransfer t readonly_prop +end -and clipboardEvent = - object - inherit event +and clipboardEvent = object + inherit event - method clipboardData : dataTransfer t readonly_prop - end + method clipboardData : dataTransfer t readonly_prop +end -and dataTransfer = - object - method dropEffect : js_string t prop +and dataTransfer = object + method dropEffect : js_string t prop - method effectAllowed : js_string t prop + method effectAllowed : js_string t prop - method files : File.fileList t readonly_prop + method files : File.fileList t readonly_prop - method types : js_string t js_array t readonly_prop + method types : js_string t js_array t readonly_prop - method addElement : element t -> unit meth + method addElement : element t -> unit meth - method clearData : js_string t -> unit meth + method clearData : js_string t -> unit meth - method clearData_all : unit meth + method clearData_all : unit meth - method getData : js_string t -> js_string t meth + method getData : js_string t -> js_string t meth - method setData : js_string t -> js_string t -> unit meth + method setData : js_string t -> js_string t -> unit meth - method setDragImage : element t -> int -> int -> unit meth - end + method setDragImage : element t -> int -> int -> unit meth +end (** Common properties of event target objects: [onclick], [onkeypress], ... *) -and eventTarget = - object ('self) - method onclick : ('self t, mouseEvent t) event_listener writeonly_prop +and eventTarget = object ('self) + method onclick : ('self t, mouseEvent t) event_listener writeonly_prop - method ondblclick : ('self t, mouseEvent t) event_listener writeonly_prop + method ondblclick : ('self t, mouseEvent t) event_listener writeonly_prop - method onmousedown : ('self t, mouseEvent t) event_listener writeonly_prop + method onmousedown : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseup : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseup : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseover : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseover : ('self t, mouseEvent t) event_listener writeonly_prop - method onmousemove : ('self t, mouseEvent t) event_listener writeonly_prop + method onmousemove : ('self t, mouseEvent t) event_listener writeonly_prop - method onmouseout : ('self t, mouseEvent t) event_listener writeonly_prop + method onmouseout : ('self t, mouseEvent t) event_listener writeonly_prop - method onkeypress : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeypress : ('self t, keyboardEvent t) event_listener writeonly_prop - method onkeydown : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeydown : ('self t, keyboardEvent t) event_listener writeonly_prop - method onkeyup : ('self t, keyboardEvent t) event_listener writeonly_prop + method onkeyup : ('self t, keyboardEvent t) event_listener writeonly_prop - method onscroll : ('self t, event t) event_listener writeonly_prop + method onscroll : ('self t, event t) event_listener writeonly_prop - method onwheel : ('self t, mousewheelEvent t) event_listener writeonly_prop + method onwheel : ('self t, mousewheelEvent t) event_listener writeonly_prop - method ondragstart : ('self t, dragEvent t) event_listener writeonly_prop + method ondragstart : ('self t, dragEvent t) event_listener writeonly_prop - method ondragend : ('self t, dragEvent t) event_listener writeonly_prop + method ondragend : ('self t, dragEvent t) event_listener writeonly_prop - method ondragenter : ('self t, dragEvent t) event_listener writeonly_prop + method ondragenter : ('self t, dragEvent t) event_listener writeonly_prop - method ondragover : ('self t, dragEvent t) event_listener writeonly_prop + method ondragover : ('self t, dragEvent t) event_listener writeonly_prop - method ondragleave : ('self t, dragEvent t) event_listener writeonly_prop + method ondragleave : ('self t, dragEvent t) event_listener writeonly_prop - method ondrag : ('self t, dragEvent t) event_listener writeonly_prop + method ondrag : ('self t, dragEvent t) event_listener writeonly_prop - method ondrop : ('self t, dragEvent t) event_listener writeonly_prop + method ondrop : ('self t, dragEvent t) event_listener writeonly_prop - method onanimationstart : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationstart : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationend : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationend : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationiteration : - ('self t, animationEvent t) event_listener writeonly_prop + method onanimationiteration : ('self t, animationEvent t) event_listener writeonly_prop - method onanimationcancel : ('self t, animationEvent t) event_listener writeonly_prop + method onanimationcancel : ('self t, animationEvent t) event_listener writeonly_prop - method ontransitionrun : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionrun : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitionstart : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionstart : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitionend : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitionend : ('self t, transitionEvent t) event_listener writeonly_prop - method ontransitioncancel : ('self t, transitionEvent t) event_listener writeonly_prop + method ontransitioncancel : ('self t, transitionEvent t) event_listener writeonly_prop - method ongotpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop + method ongotpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop - method onlostpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop + method onlostpointercapture : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerenter : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerenter : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointercancel : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointercancel : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerdown : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerdown : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerleave : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerleave : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointermove : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointermove : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerout : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerout : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerover : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerover : ('self t, pointerEvent t) event_listener writeonly_prop - method onpointerup : ('self t, pointerEvent t) event_listener writeonly_prop + method onpointerup : ('self t, pointerEvent t) event_listener writeonly_prop - method dispatchEvent : event t -> bool t meth - end + method dispatchEvent : event t -> bool t meth +end -and popStateEvent = - object - inherit event +and popStateEvent = object + inherit event - method state : Js.Unsafe.any readonly_prop - end + method state : Js.Unsafe.any readonly_prop +end -and pointerEvent = - object - inherit mouseEvent +and pointerEvent = object + inherit mouseEvent - method pointerId : int Js.readonly_prop + method pointerId : int Js.readonly_prop - method width : float Js.readonly_prop + method width : float Js.readonly_prop - method height : float Js.readonly_prop + method height : float Js.readonly_prop - method pressure : float Js.readonly_prop + method pressure : float Js.readonly_prop - method tangentialPressure : float Js.readonly_prop + method tangentialPressure : float Js.readonly_prop - method tiltX : int Js.readonly_prop + method tiltX : int Js.readonly_prop - method tiltY : int Js.readonly_prop + method tiltY : int Js.readonly_prop - method twist : int Js.readonly_prop + method twist : int Js.readonly_prop - method pointerType : Js.js_string Js.t Js.readonly_prop + method pointerType : Js.js_string Js.t Js.readonly_prop - method isPrimary : bool Js.t Js.readonly_prop - end + method isPrimary : bool Js.t Js.readonly_prop +end -and storageEvent = - object - inherit event +and storageEvent = object + inherit event - method key : js_string t opt readonly_prop + method key : js_string t opt readonly_prop - method oldValue : js_string t opt readonly_prop + method oldValue : js_string t opt readonly_prop - method newValue : js_string t opt readonly_prop + method newValue : js_string t opt readonly_prop - method url : js_string t readonly_prop + method url : js_string t readonly_prop - method storageArea : storage t opt readonly_prop - end + method storageArea : storage t opt readonly_prop +end (** Storage *) -and storage = - object - method length : int readonly_prop +and storage = object + method length : int readonly_prop - method key : int -> js_string t opt meth + method key : int -> js_string t opt meth - method getItem : js_string t -> js_string t opt meth + method getItem : js_string t -> js_string t opt meth - method setItem : js_string t -> js_string t -> unit meth + method setItem : js_string t -> js_string t -> unit meth - method removeItem : js_string t -> unit meth + method removeItem : js_string t -> unit meth - method clear : unit meth - end + method clear : unit meth +end -and hashChangeEvent = - object - inherit event +and hashChangeEvent = object + inherit event - method oldURL : js_string t readonly_prop + method oldURL : js_string t readonly_prop - method newURL : js_string t readonly_prop - end + method newURL : js_string t readonly_prop +end -and animationEvent = - object - inherit event +and animationEvent = object + inherit event - method animationName : js_string t readonly_prop + method animationName : js_string t readonly_prop - method elapsedTime : float readonly_prop + method elapsedTime : float readonly_prop - method pseudoElement : js_string t readonly_prop - end + method pseudoElement : js_string t readonly_prop +end -and transitionEvent = - object - inherit event +and transitionEvent = object + inherit event - method propertyName : js_string t readonly_prop + method propertyName : js_string t readonly_prop - method elapsedTime : float readonly_prop + method elapsedTime : float readonly_prop - method pseudoElement : js_string t readonly_prop - end + method pseudoElement : js_string t readonly_prop +end -and mediaEvent = - object - inherit event - end +and mediaEvent = object + inherit event +end -and messageEvent = - object - inherit event +and messageEvent = object + inherit event - method data : Unsafe.any opt readonly_prop + method data : Unsafe.any opt readonly_prop - method source : Unsafe.any opt readonly_prop - end + method source : Unsafe.any opt readonly_prop +end (** {2 HTML elements} *) -and nodeSelector = - object - method querySelector : js_string t -> element t opt meth +and nodeSelector = object + method querySelector : js_string t -> element t opt meth - method querySelectorAll : js_string t -> element Dom.nodeList t meth - end + method querySelectorAll : js_string t -> element Dom.nodeList t meth +end -and tokenList = - object - method length : int readonly_prop +and tokenList = object + method length : int readonly_prop - method item : int -> js_string t optdef meth + method item : int -> js_string t optdef meth - method contains : js_string t -> bool t meth + method contains : js_string t -> bool t meth - method add : js_string t -> unit meth + method add : js_string t -> unit meth - method remove : js_string t -> unit meth + method remove : js_string t -> unit meth - method toggle : js_string t -> bool t meth + method toggle : js_string t -> bool t meth - method stringifier : js_string t prop - end + method stringifier : js_string t prop +end (** Properties common to all HTML elements *) -and element = - object - inherit Dom.element +and element = object + inherit Dom.element - inherit nodeSelector + inherit nodeSelector - method id : js_string t prop + method id : js_string t prop - method title : js_string t prop + method title : js_string t prop - method lang : js_string t prop + method lang : js_string t prop - method dir : js_string t prop + method dir : js_string t prop - method className : js_string t prop + method className : js_string t prop - method classList : tokenList t readonly_prop + method classList : tokenList t readonly_prop - method closest : js_string t -> element t opt meth + method closest : js_string t -> element t opt meth - method style : cssStyleDeclaration t prop + method style : cssStyleDeclaration t prop - method innerHTML : js_string t prop + method innerHTML : js_string t prop - method outerHTML : js_string t prop + method outerHTML : js_string t prop - method textContent : js_string t opt prop + method textContent : js_string t opt prop - method innerText : js_string t prop + method innerText : js_string t prop - method clientLeft : int readonly_prop + method clientLeft : int readonly_prop - method clientTop : int readonly_prop + method clientTop : int readonly_prop - method clientWidth : int readonly_prop + method clientWidth : int readonly_prop - method clientHeight : int readonly_prop + method clientHeight : int readonly_prop - method offsetLeft : int readonly_prop + method offsetLeft : int readonly_prop - method offsetTop : int readonly_prop + method offsetTop : int readonly_prop - (* Incorrect in IE until IE7 included *) - method offsetParent : element t opt readonly_prop + (* Incorrect in IE until IE7 included *) + method offsetParent : element t opt readonly_prop - method offsetWidth : int readonly_prop + method offsetWidth : int readonly_prop - method offsetHeight : int readonly_prop + method offsetHeight : int readonly_prop - method scrollLeft : int prop + method scrollLeft : int prop - method scrollTop : int prop + method scrollTop : int prop - method scrollWidth : int prop + method scrollWidth : int prop - method scrollHeight : int prop + method scrollHeight : int prop - method getClientRects : clientRectList t meth + method getClientRects : clientRectList t meth - method getBoundingClientRect : clientRect t meth + method getBoundingClientRect : clientRect t meth - method scrollIntoView : bool t -> unit meth + method scrollIntoView : bool t -> unit meth - method click : unit meth + method click : unit meth - method focus : unit meth + method focus : unit meth - method blur : unit meth + method blur : unit meth - inherit eventTarget - end + inherit eventTarget +end (** Rectangular box (used for element bounding boxes) *) -and clientRect = - object - method top : float readonly_prop +and clientRect = object + method top : float readonly_prop - method right : float readonly_prop + method right : float readonly_prop - method bottom : float readonly_prop + method bottom : float readonly_prop - method left : float readonly_prop + method left : float readonly_prop - method width : float optdef readonly_prop + method width : float optdef readonly_prop - method height : float optdef readonly_prop - end + method height : float optdef readonly_prop +end -and clientRectList = - object - method length : int readonly_prop +and clientRectList = object + method length : int readonly_prop - method item : int -> clientRect t opt meth - end + method item : int -> clientRect t opt meth +end (** Collection of HTML elements *) -class type ['node] collection = - object - method length : int readonly_prop +class type ['node] collection = object + method length : int readonly_prop - method item : int -> 'node t opt meth + method item : int -> 'node t opt meth - method namedItem : js_string t -> 'node t opt meth - end + method namedItem : js_string t -> 'node t opt meth +end class type htmlElement = element -class type headElement = - object - inherit element +class type headElement = object + inherit element - method profile : js_string t prop - end + method profile : js_string t prop +end -class type linkElement = - object - inherit element +class type linkElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method charset : js_string t prop + method charset : js_string t prop - method crossorigin : js_string t prop + method crossorigin : js_string t prop - method href : js_string t prop + method href : js_string t prop - method hreflang : js_string t prop + method hreflang : js_string t prop - method media : js_string t prop + method media : js_string t prop - method rel : js_string t prop + method rel : js_string t prop - method rev : js_string t prop + method rev : js_string t prop - method target : js_string t prop + method target : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type titleElement = - object - inherit element +class type titleElement = object + inherit element - method text : js_string t prop - end + method text : js_string t prop +end -class type metaElement = - object - inherit element +class type metaElement = object + inherit element - method content : js_string t prop + method content : js_string t prop - method httpEquiv : js_string t prop + method httpEquiv : js_string t prop - method name : js_string t prop + method name : js_string t prop - method scheme : js_string t prop - end + method scheme : js_string t prop +end -class type baseElement = - object - inherit element +class type baseElement = object + inherit element - method href : js_string t prop + method href : js_string t prop - method target : js_string t prop - end + method target : js_string t prop +end -class type styleElement = - object - inherit element +class type styleElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method media : js_string t prop + method media : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end class type bodyElement = element -class type formElement = - object - inherit element +class type formElement = object + inherit element - method elements : element collection t readonly_prop + method elements : element collection t readonly_prop - method length : int readonly_prop + method length : int readonly_prop - method acceptCharset : js_string t prop + method acceptCharset : js_string t prop - method action : js_string t prop + method action : js_string t prop - method enctype : js_string t prop + method enctype : js_string t prop - method _method : js_string t prop + method _method : js_string t prop - method target : js_string t prop + method target : js_string t prop - method submit : unit meth + method submit : unit meth - method reset : unit meth + method reset : unit meth - method onsubmit : ('self t, submitEvent t) event_listener writeonly_prop - end + method onsubmit : ('self t, submitEvent t) event_listener writeonly_prop +end -class type optGroupElement = - object - inherit element +class type optGroupElement = object + inherit element - method disabled : bool t prop + method disabled : bool t prop - method label : js_string t prop - end + method label : js_string t prop +end -class type optionElement = - object - inherit optGroupElement +class type optionElement = object + inherit optGroupElement - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method defaultSelected : bool t prop + method defaultSelected : bool t prop - method text : js_string t readonly_prop + method text : js_string t readonly_prop - method index : int readonly_prop + method index : int readonly_prop - method selected : bool t prop + method selected : bool t prop - method value : js_string t prop - end + method value : js_string t prop +end -class type selectElement = - object ('self) - inherit element +class type selectElement = object ('self) + inherit element - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - (* Cannot be changed under IE *) - method selectedIndex : int prop + (* Cannot be changed under IE *) + method selectedIndex : int prop - method value : js_string t prop + method value : js_string t prop - method length : int prop + method length : int prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method options : optionElement collection t readonly_prop + method options : optionElement collection t readonly_prop - method disabled : bool t prop + method disabled : bool t prop - method multiple : bool t prop + method multiple : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - (* Cannot be changed under IE *) - method size : int prop + (* Cannot be changed under IE *) + method size : int prop - method tabIndex : int prop + method tabIndex : int prop - method add : #optGroupElement t -> #optGroupElement t opt -> unit meth + method add : #optGroupElement t -> #optGroupElement t opt -> unit meth - method remove : int -> unit meth + method remove : int -> unit meth - method required : bool t writeonly_prop + method required : bool t writeonly_prop - (* Not supported by IE 9/Safari *) - method onchange : ('self t, event t) event_listener prop + (* Not supported by IE 9/Safari *) + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop - end + method oninput : ('self t, event t) event_listener prop +end -class type inputElement = - object ('self) - inherit element +class type inputElement = object ('self) + inherit element - method defaultValue : js_string t prop + method defaultValue : js_string t prop - method defaultChecked : js_string t prop + method defaultChecked : js_string t prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accept : js_string t prop + method accept : js_string t prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method align : js_string t prop + method align : js_string t prop - method alt : js_string t prop + method alt : js_string t prop - method checked : bool t prop + method checked : bool t prop - method disabled : bool t prop + method disabled : bool t prop - method maxLength : int prop + method maxLength : int prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - (* Cannot be changed under IE *) - method readOnly : bool t prop + (* Cannot be changed under IE *) + method readOnly : bool t prop - method required : bool t writeonly_prop + method required : bool t writeonly_prop - (* Not supported by IE 9/Safari *) - method size : int prop + (* Not supported by IE 9/Safari *) + method size : int prop - method src : js_string t prop + method src : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - (* Cannot be changed under IE *) - method useMap : js_string t prop + (* Cannot be changed under IE *) + method useMap : js_string t prop - method value : js_string t prop + method value : js_string t prop - method select : unit meth + method select : unit meth - method files : File.fileList t optdef readonly_prop + method files : File.fileList t optdef readonly_prop - method placeholder : js_string t writeonly_prop + method placeholder : js_string t writeonly_prop - (* Not supported by IE 9 *) - method selectionDirection : js_string t prop + (* Not supported by IE 9 *) + method selectionDirection : js_string t prop - method selectionStart : int prop + method selectionStart : int prop - method selectionEnd : int prop + method selectionEnd : int prop - method onselect : ('self t, event t) event_listener prop + method onselect : ('self t, event t) event_listener prop - method onchange : ('self t, event t) event_listener prop + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop + method oninput : ('self t, event t) event_listener prop - method onblur : ('self t, focusEvent t) event_listener prop + method onblur : ('self t, focusEvent t) event_listener prop - method onfocus : ('self t, focusEvent t) event_listener prop - end + method onfocus : ('self t, focusEvent t) event_listener prop +end -class type textAreaElement = - object ('self) - inherit element +class type textAreaElement = object ('self) + inherit element - method defaultValue : js_string t prop + method defaultValue : js_string t prop - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method cols : int prop + method cols : int prop - method disabled : bool t prop + method disabled : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - (* Cannot be changed under IE *) - method readOnly : bool t prop + (* Cannot be changed under IE *) + method readOnly : bool t prop - method rows : int prop + method rows : int prop - method selectionDirection : js_string t prop + method selectionDirection : js_string t prop - method selectionEnd : int prop + method selectionEnd : int prop - method selectionStart : int prop + method selectionStart : int prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - (* Cannot be changed under IE *) - method value : js_string t prop + (* Cannot be changed under IE *) + method value : js_string t prop - method select : unit meth + method select : unit meth - method required : bool t writeonly_prop + method required : bool t writeonly_prop - (* Not supported by IE 9/Safari *) - method placeholder : js_string t writeonly_prop + (* Not supported by IE 9/Safari *) + method placeholder : js_string t writeonly_prop - (* Not supported by IE 9 *) - method onselect : ('self t, event t) event_listener prop + (* Not supported by IE 9 *) + method onselect : ('self t, event t) event_listener prop - method onchange : ('self t, event t) event_listener prop + method onchange : ('self t, event t) event_listener prop - method oninput : ('self t, event t) event_listener prop + method oninput : ('self t, event t) event_listener prop - method onblur : ('self t, focusEvent t) event_listener prop + method onblur : ('self t, focusEvent t) event_listener prop - method onfocus : ('self t, focusEvent t) event_listener prop - end + method onfocus : ('self t, focusEvent t) event_listener prop +end -class type buttonElement = - object - inherit element +class type buttonElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method disabled : bool t prop + method disabled : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - (* Cannot be changed under IE *) - method tabIndex : int prop + (* Cannot be changed under IE *) + method tabIndex : int prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - (* Cannot be changed under IE *) - method value : js_string t prop - end + (* Cannot be changed under IE *) + method value : js_string t prop +end -class type labelElement = - object - inherit element +class type labelElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop + method accessKey : js_string t prop - method htmlFor : js_string t prop - end + method htmlFor : js_string t prop +end -class type fieldSetElement = - object - inherit element +class type fieldSetElement = object + inherit element - method form : formElement t opt readonly_prop - end + method form : formElement t opt readonly_prop +end -class type legendElement = - object - inherit element +class type legendElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method accessKey : js_string t prop - end + method accessKey : js_string t prop +end class type uListElement = element @@ -1168,12 +1120,11 @@ class type paragraphElement = element class type headingElement = element -class type quoteElement = - object - inherit element +class type quoteElement = object + inherit element - method cite : js_string t prop - end + method cite : js_string t prop +end class type preElement = element @@ -1181,325 +1132,310 @@ class type brElement = element class type hrElement = element -class type modElement = - object - inherit element +class type modElement = object + inherit element - method cite : js_string t prop + method cite : js_string t prop - method dateTime : js_string t prop - end + method dateTime : js_string t prop +end -class type anchorElement = - object - inherit element +class type anchorElement = object + inherit element - method accessKey : js_string t prop + method accessKey : js_string t prop - method charset : js_string t prop + method charset : js_string t prop - method coords : js_string t prop + method coords : js_string t prop - method href : js_string t prop + method href : js_string t prop - method hreflang : js_string t prop + method hreflang : js_string t prop - method name : js_string t prop + method name : js_string t prop - method rel : js_string t prop + method rel : js_string t prop - method rev : js_string t prop + method rev : js_string t prop - method shape : js_string t prop + method shape : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method target : js_string t prop + method target : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type imageElement = - object ('self) - inherit element +class type imageElement = object ('self) + inherit element - method alt : js_string t prop + method alt : js_string t prop - method src : js_string t prop + method src : js_string t prop - method useMap : js_string t prop + method useMap : js_string t prop - method isMap : bool t prop + method isMap : bool t prop - method width : int prop + method width : int prop - method height : int prop + method height : int prop - (* Properties naturalWidth/Height not available in all browsers. *) - method naturalWidth : int optdef readonly_prop + (* Properties naturalWidth/Height not available in all browsers. *) + method naturalWidth : int optdef readonly_prop - method naturalHeight : int optdef readonly_prop + method naturalHeight : int optdef readonly_prop - method complete : bool t prop + method complete : bool t prop - method onload : ('self t, event t) event_listener prop + method onload : ('self t, event t) event_listener prop - method onerror : ('self t, event t) event_listener prop + method onerror : ('self t, event t) event_listener prop - method onabort : ('self t, event t) event_listener prop - end + method onabort : ('self t, event t) event_listener prop +end -class type objectElement = - object - inherit element +class type objectElement = object + inherit element - method form : formElement t opt readonly_prop + method form : formElement t opt readonly_prop - method code : js_string t prop + method code : js_string t prop - method archive : js_string t prop + method archive : js_string t prop - method codeBase : js_string t prop + method codeBase : js_string t prop - method codeType : js_string t prop + method codeType : js_string t prop - method data : js_string t prop + method data : js_string t prop - method declare : bool t prop + method declare : bool t prop - method height : js_string t prop + method height : js_string t prop - method name : js_string t prop + method name : js_string t prop - method standby : js_string t prop + method standby : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method _type : js_string t prop + method _type : js_string t prop - method useMap : js_string t prop + method useMap : js_string t prop - method width : js_string t prop + method width : js_string t prop - method document : Dom.element Dom.document t opt readonly_prop - end + method document : Dom.element Dom.document t opt readonly_prop +end -class type paramElement = - object - inherit element +class type paramElement = object + inherit element - method name : js_string t prop + method name : js_string t prop - method _type : js_string t prop + method _type : js_string t prop - method value : js_string t prop + method value : js_string t prop - method valueType : js_string t prop - end + method valueType : js_string t prop +end -class type areaElement = - object - inherit element +class type areaElement = object + inherit element - method accessKey : js_string t prop + method accessKey : js_string t prop - method alt : js_string t prop + method alt : js_string t prop - method coords : js_string t prop + method coords : js_string t prop - method href : js_string t prop + method href : js_string t prop - method noHref : bool t prop + method noHref : bool t prop - method shape : js_string t prop + method shape : js_string t prop - method tabIndex : int prop + method tabIndex : int prop - method target : js_string t prop - end + method target : js_string t prop +end -class type mapElement = - object - inherit element +class type mapElement = object + inherit element - method areas : areaElement collection t readonly_prop + method areas : areaElement collection t readonly_prop - method name : js_string t prop - end + method name : js_string t prop +end -class type scriptElement = - object - inherit element +class type scriptElement = object + inherit element - method text : js_string t prop + method text : js_string t prop - method charset : js_string t prop + method charset : js_string t prop - method defer : bool t prop + method defer : bool t prop - method src : js_string t prop + method src : js_string t prop - method _type : js_string t prop + method _type : js_string t prop - method async : bool t prop - end + method async : bool t prop +end -class type embedElement = - object - inherit element +class type embedElement = object + inherit element - method src : js_string t prop + method src : js_string t prop - method height : js_string t prop + method height : js_string t prop - method width : js_string t prop + method width : js_string t prop - method _type : js_string t prop - end + method _type : js_string t prop +end -class type tableCellElement = - object - inherit element +class type tableCellElement = object + inherit element - method cellIndex : int readonly_prop + method cellIndex : int readonly_prop - method abbr : js_string t prop + method abbr : js_string t prop - method align : js_string t prop + method align : js_string t prop - method axis : js_string t prop + method axis : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method colSpan : int prop + method colSpan : int prop - method headers : js_string t prop + method headers : js_string t prop - method rowSpan : int prop + method rowSpan : int prop - method scope : js_string t prop + method scope : js_string t prop - method vAlign : js_string t prop - end + method vAlign : js_string t prop +end -class type tableRowElement = - object - inherit element +class type tableRowElement = object + inherit element - method rowIndex : int readonly_prop + method rowIndex : int readonly_prop - method sectionRowIndex : int readonly_prop + method sectionRowIndex : int readonly_prop - method cells : tableCellElement collection t readonly_prop + method cells : tableCellElement collection t readonly_prop - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method insertCell : int -> tableCellElement t meth + method insertCell : int -> tableCellElement t meth - method deleteCell : int -> unit meth - end + method deleteCell : int -> unit meth +end -class type tableColElement = - object - inherit element +class type tableColElement = object + inherit element - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method span : int prop + method span : int prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method width : js_string t prop - end + method width : js_string t prop +end -class type tableSectionElement = - object - inherit element +class type tableSectionElement = object + inherit element - method align : js_string t prop + method align : js_string t prop - method ch : js_string t prop + method ch : js_string t prop - method chOff : js_string t prop + method chOff : js_string t prop - method vAlign : js_string t prop + method vAlign : js_string t prop - method rows : tableRowElement collection t readonly_prop + method rows : tableRowElement collection t readonly_prop - method insertRow : int -> tableRowElement t meth + method insertRow : int -> tableRowElement t meth - method deleteRow : int -> unit meth - end + method deleteRow : int -> unit meth +end class type tableCaptionElement = element -class type tableElement = - object - inherit element +class type tableElement = object + inherit element - method caption : tableCaptionElement t prop + method caption : tableCaptionElement t prop - method tHead : tableSectionElement t prop + method tHead : tableSectionElement t prop - method tFoot : tableSectionElement t prop + method tFoot : tableSectionElement t prop - method rows : tableRowElement collection t readonly_prop + method rows : tableRowElement collection t readonly_prop - method tBodies : tableSectionElement collection t readonly_prop + method tBodies : tableSectionElement collection t readonly_prop - method align : js_string t prop + method align : js_string t prop - method border : js_string t prop + method border : js_string t prop - method cellPadding : js_string t prop + method cellPadding : js_string t prop - method cellSpacing : js_string t prop + method cellSpacing : js_string t prop - method frame : js_string t prop + method frame : js_string t prop - method rules : js_string t prop + method rules : js_string t prop - method summary : js_string t prop + method summary : js_string t prop - method width : js_string t prop + method width : js_string t prop - method createTHead : tableSectionElement t meth + method createTHead : tableSectionElement t meth - method deleteTHead : unit meth + method deleteTHead : unit meth - method createTFoot : tableSectionElement t meth + method createTFoot : tableSectionElement t meth - method deleteTFoot : unit meth + method deleteTFoot : unit meth - method createCaption : tableCaptionElement t meth + method createCaption : tableCaptionElement t meth - method deleteCaption : unit meth + method deleteCaption : unit meth - method insertRow : int -> tableRowElement t meth + method insertRow : int -> tableRowElement t meth - method deleteRow : int -> unit meth - end + method deleteRow : int -> unit meth +end -class type timeRanges = - object - method length : int readonly_prop +class type timeRanges = object + method length : int readonly_prop - method start : int -> float meth + method start : int -> float meth - method end_ : int -> float meth - end + method end_ : int -> float meth +end type networkState = | NETWORK_EMPTY @@ -1514,108 +1450,105 @@ type readyState = | HAVE_FUTURE_DATA | HAVE_ENOUGH_DATA -class type mediaElement = - object - inherit element +class type mediaElement = object + inherit element - method canPlayType : js_string t -> js_string t meth + method canPlayType : js_string t -> js_string t meth - method load : unit meth + method load : unit meth - method play : unit meth + method play : unit meth - method pause : unit meth + method pause : unit meth - method autoplay : bool t prop + method autoplay : bool t prop - method buffered : timeRanges t readonly_prop + method buffered : timeRanges t readonly_prop - method controls : bool t prop + method controls : bool t prop - method currentSrc : js_string t readonly_prop + method currentSrc : js_string t readonly_prop - method currentTime : float prop + method currentTime : float prop - method duration : float readonly_prop + method duration : float readonly_prop - method ended : bool t readonly_prop + method ended : bool t readonly_prop - method loop : bool t prop + method loop : bool t prop - method mediagroup : js_string t prop + method mediagroup : js_string t prop - method muted : bool t prop + method muted : bool t prop - method networkState_int : int readonly_prop + method networkState_int : int readonly_prop - method networkState : networkState readonly_prop + method networkState : networkState readonly_prop - method paused : bool t readonly_prop + method paused : bool t readonly_prop - method playbackRate : float prop + method playbackRate : float prop - method played : timeRanges t readonly_prop + method played : timeRanges t readonly_prop - method preload : js_string t prop + method preload : js_string t prop - method readyState_int : int readonly_prop + method readyState_int : int readonly_prop - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method seekable : timeRanges t readonly_prop + method seekable : timeRanges t readonly_prop - method seeking : bool t readonly_prop + method seeking : bool t readonly_prop - method src : js_string t prop + method src : js_string t prop - method volume : float prop + method volume : float prop - method oncanplay : ('self t, mediaEvent t) event_listener writeonly_prop + method oncanplay : ('self t, mediaEvent t) event_listener writeonly_prop - method oncanplaythrough : ('self t, mediaEvent t) event_listener writeonly_prop + method oncanplaythrough : ('self t, mediaEvent t) event_listener writeonly_prop - method ondurationchange : ('self t, mediaEvent t) event_listener writeonly_prop + method ondurationchange : ('self t, mediaEvent t) event_listener writeonly_prop - method onemptied : ('self t, mediaEvent t) event_listener writeonly_prop + method onemptied : ('self t, mediaEvent t) event_listener writeonly_prop - method onended : ('self t, mediaEvent t) event_listener writeonly_prop + method onended : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadeddata : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadeddata : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadedmetadata : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadedmetadata : ('self t, mediaEvent t) event_listener writeonly_prop - method onloadstart : ('self t, mediaEvent t) event_listener writeonly_prop + method onloadstart : ('self t, mediaEvent t) event_listener writeonly_prop - method onpause : ('self t, mediaEvent t) event_listener writeonly_prop + method onpause : ('self t, mediaEvent t) event_listener writeonly_prop - method onplay : ('self t, mediaEvent t) event_listener writeonly_prop + method onplay : ('self t, mediaEvent t) event_listener writeonly_prop - method onplaying : ('self t, mediaEvent t) event_listener writeonly_prop + method onplaying : ('self t, mediaEvent t) event_listener writeonly_prop - method onratechange : ('self t, mediaEvent t) event_listener writeonly_prop + method onratechange : ('self t, mediaEvent t) event_listener writeonly_prop - method onseeked : ('self t, mediaEvent t) event_listener writeonly_prop + method onseeked : ('self t, mediaEvent t) event_listener writeonly_prop - method onseeking : ('self t, mediaEvent t) event_listener writeonly_prop + method onseeking : ('self t, mediaEvent t) event_listener writeonly_prop - method onstalled : ('self t, mediaEvent t) event_listener writeonly_prop + method onstalled : ('self t, mediaEvent t) event_listener writeonly_prop - method onsuspend : ('self t, mediaEvent t) event_listener writeonly_prop + method onsuspend : ('self t, mediaEvent t) event_listener writeonly_prop - method onvolumechange : ('self t, mediaEvent t) event_listener writeonly_prop + method onvolumechange : ('self t, mediaEvent t) event_listener writeonly_prop - method onwaiting : ('self t, mediaEvent t) event_listener writeonly_prop - end + method onwaiting : ('self t, mediaEvent t) event_listener writeonly_prop +end -class type audioElement = - object - inherit mediaElement - end +class type audioElement = object + inherit mediaElement +end -class type videoElement = - object - inherit mediaElement - end +class type videoElement = object + inherit mediaElement +end (** {2 Canvas object} *) @@ -1625,375 +1558,364 @@ val _2d_ : context type canvasPattern -class type canvasElement = - object - inherit element +class type canvasElement = object + inherit element - method width : int prop + method width : int prop - method height : int prop + method height : int prop - method toDataURL : js_string t meth + method toDataURL : js_string t meth - method toDataURL_type : js_string t -> js_string t meth + method toDataURL_type : js_string t -> js_string t meth - method toDataURL_type_compression : js_string t -> float -> js_string t meth + method toDataURL_type_compression : js_string t -> float -> js_string t meth - method getContext : context -> canvasRenderingContext2D t meth - end + method getContext : context -> canvasRenderingContext2D t meth +end -and canvasRenderingContext2D = - object - method canvas : canvasElement t readonly_prop +and canvasRenderingContext2D = object + method canvas : canvasElement t readonly_prop - method save : unit meth + method save : unit meth - method restore : unit meth + method restore : unit meth - method scale : float -> float -> unit meth + method scale : float -> float -> unit meth - method rotate : float -> unit meth + method rotate : float -> unit meth - method translate : float -> float -> unit meth + method translate : float -> float -> unit meth - method transform : float -> float -> float -> float -> float -> float -> unit meth + method transform : float -> float -> float -> float -> float -> float -> unit meth - method setTransform : float -> float -> float -> float -> float -> float -> unit meth + method setTransform : float -> float -> float -> float -> float -> float -> unit meth - method globalAlpha : float prop + method globalAlpha : float prop - method globalCompositeOperation : js_string t prop + method globalCompositeOperation : js_string t prop - method strokeStyle : js_string t writeonly_prop + method strokeStyle : js_string t writeonly_prop - method strokeStyle_gradient : canvasGradient t writeonly_prop + method strokeStyle_gradient : canvasGradient t writeonly_prop - method strokeStyle_pattern : canvasPattern t writeonly_prop + method strokeStyle_pattern : canvasPattern t writeonly_prop - method fillStyle : js_string t writeonly_prop + method fillStyle : js_string t writeonly_prop - method fillStyle_gradient : canvasGradient t writeonly_prop + method fillStyle_gradient : canvasGradient t writeonly_prop - method fillStyle_pattern : canvasPattern t writeonly_prop + method fillStyle_pattern : canvasPattern t writeonly_prop - method createLinearGradient : - float -> float -> float -> float -> canvasGradient t meth + method createLinearGradient : float -> float -> float -> float -> canvasGradient t meth - method createRadialGradient : - float -> float -> float -> float -> float -> float -> canvasGradient t meth + method createRadialGradient : + float -> float -> float -> float -> float -> float -> canvasGradient t meth - method createPattern : imageElement t -> js_string t -> canvasPattern t meth + method createPattern : imageElement t -> js_string t -> canvasPattern t meth - method createPattern_fromCanvas : - canvasElement t -> js_string t -> canvasPattern t meth + method createPattern_fromCanvas : canvasElement t -> js_string t -> canvasPattern t meth - method createPattern_fromVideo : videoElement t -> js_string t -> canvasPattern t meth + method createPattern_fromVideo : videoElement t -> js_string t -> canvasPattern t meth - method lineWidth : float prop + method lineWidth : float prop - method lineCap : js_string t prop + method lineCap : js_string t prop - method lineJoin : js_string t prop + method lineJoin : js_string t prop - method miterLimit : float prop + method miterLimit : float prop - method shadowOffsetX : float prop + method shadowOffsetX : float prop - method shadowOffsetY : float prop + method shadowOffsetY : float prop - method shadowBlur : float prop + method shadowBlur : float prop - method shadowColor : js_string t prop + method shadowColor : js_string t prop - method clearRect : float -> float -> float -> float -> unit meth + method clearRect : float -> float -> float -> float -> unit meth - method fillRect : float -> float -> float -> float -> unit meth + method fillRect : float -> float -> float -> float -> unit meth - method strokeRect : float -> float -> float -> float -> unit meth + method strokeRect : float -> float -> float -> float -> unit meth - method beginPath : unit meth + method beginPath : unit meth - method closePath : unit meth + method closePath : unit meth - method moveTo : float -> float -> unit meth + method moveTo : float -> float -> unit meth - method lineTo : float -> float -> unit meth + method lineTo : float -> float -> unit meth - method quadraticCurveTo : float -> float -> float -> float -> unit meth + method quadraticCurveTo : float -> float -> float -> float -> unit meth - method bezierCurveTo : float -> float -> float -> float -> float -> float -> unit meth + method bezierCurveTo : float -> float -> float -> float -> float -> float -> unit meth - method arcTo : float -> float -> float -> float -> float -> unit meth + method arcTo : float -> float -> float -> float -> float -> unit meth - method rect : float -> float -> float -> float -> unit meth + method rect : float -> float -> float -> float -> unit meth - method arc : float -> float -> float -> float -> float -> bool t -> unit meth + method arc : float -> float -> float -> float -> float -> bool t -> unit meth - method fill : unit meth + method fill : unit meth - method stroke : unit meth + method stroke : unit meth - method clip : unit meth + method clip : unit meth - method isPointInPath : float -> float -> bool t meth + method isPointInPath : float -> float -> bool t meth - method drawFocusRing : #element t -> float -> float -> bool t -> bool t meth + method drawFocusRing : #element t -> float -> float -> bool t -> bool t meth - method font : js_string t prop + method font : js_string t prop - method textAlign : js_string t prop + method textAlign : js_string t prop - method textBaseline : js_string t prop + method textBaseline : js_string t prop - method fillText : js_string t -> float -> float -> unit meth + method fillText : js_string t -> float -> float -> unit meth - method fillText_withWidth : js_string t -> float -> float -> float -> unit meth + method fillText_withWidth : js_string t -> float -> float -> float -> unit meth - method strokeText : js_string t -> float -> float -> unit meth + method strokeText : js_string t -> float -> float -> unit meth - method strokeText_withWidth : js_string t -> float -> float -> float -> unit meth + method strokeText_withWidth : js_string t -> float -> float -> float -> unit meth - method measureText : js_string t -> textMetrics t meth + method measureText : js_string t -> textMetrics t meth - method drawImage : imageElement t -> float -> float -> unit meth + method drawImage : imageElement t -> float -> float -> unit meth - method drawImage_withSize : - imageElement t -> float -> float -> float -> float -> unit meth + method drawImage_withSize : + imageElement t -> float -> float -> float -> float -> unit meth - method drawImage_full : - imageElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_full : + imageElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - method drawImage_fromCanvas : canvasElement t -> float -> float -> unit meth + method drawImage_fromCanvas : canvasElement t -> float -> float -> unit meth - method drawImage_fromCanvasWithSize : - canvasElement t -> float -> float -> float -> float -> unit meth + method drawImage_fromCanvasWithSize : + canvasElement t -> float -> float -> float -> float -> unit meth - method drawImage_fullFromCanvas : - canvasElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_fullFromCanvas : + canvasElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - method drawImage_fromVideoWithVideo : videoElement t -> float -> float -> unit meth + method drawImage_fromVideoWithVideo : videoElement t -> float -> float -> unit meth - method drawImage_fromVideoWithSize : - videoElement t -> float -> float -> float -> float -> unit meth + method drawImage_fromVideoWithSize : + videoElement t -> float -> float -> float -> float -> unit meth - method drawImage_fullFromVideo : - videoElement t - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> float - -> unit meth + method drawImage_fullFromVideo : + videoElement t + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> float + -> unit meth - (* Method createImageData not available in Opera *) - method createImageData : int -> int -> imageData t meth + (* Method createImageData not available in Opera *) + method createImageData : int -> int -> imageData t meth - method getImageData : float -> float -> float -> float -> imageData t meth + method getImageData : float -> float -> float -> float -> imageData t meth - method putImageData : imageData t -> float -> float -> unit meth - end + method putImageData : imageData t -> float -> float -> unit meth +end -and canvasGradient = - object - method addColorStop : float -> js_string t -> unit meth - end +and canvasGradient = object + method addColorStop : float -> js_string t -> unit meth +end -and textMetrics = - object - method width : float readonly_prop - end +and textMetrics = object + method width : float readonly_prop +end -and imageData = - object - method width : int readonly_prop +and imageData = object + method width : int readonly_prop - method height : int readonly_prop + method height : int readonly_prop - method data : canvasPixelArray t readonly_prop - end + method data : canvasPixelArray t readonly_prop +end -and canvasPixelArray = - object - method length : int readonly_prop - end +and canvasPixelArray = object + method length : int readonly_prop +end external pixel_get : canvasPixelArray t -> int -> int = "caml_js_get" external pixel_set : canvasPixelArray t -> int -> int -> unit = "caml_js_set" (** Object representing a range **) -class type range = - object - method collapsed : bool t readonly_prop +class type range = object + method collapsed : bool t readonly_prop - method startOffset : int readonly_prop + method startOffset : int readonly_prop - method endOffset : int readonly_prop + method endOffset : int readonly_prop - method startContainer : Dom.node t readonly_prop + method startContainer : Dom.node t readonly_prop - method endContainer : Dom.node t readonly_prop + method endContainer : Dom.node t readonly_prop - method setStart : Dom.node t -> int -> unit meth + method setStart : Dom.node t -> int -> unit meth - method setEnd : Dom.node t -> int -> unit meth + method setEnd : Dom.node t -> int -> unit meth - method setStartBefore : Dom.node t -> unit meth + method setStartBefore : Dom.node t -> unit meth - method setEndBefore : Dom.node t -> unit meth + method setEndBefore : Dom.node t -> unit meth - method setStartAfter : Dom.node t -> unit meth + method setStartAfter : Dom.node t -> unit meth - method setEndAfter : Dom.node t -> unit meth + method setEndAfter : Dom.node t -> unit meth - method selectNode : Dom.node t -> unit meth + method selectNode : Dom.node t -> unit meth - method selectNodeContents : Dom.node t -> unit meth + method selectNodeContents : Dom.node t -> unit meth - method collapse : bool t -> unit meth + method collapse : bool t -> unit meth - method cloneContents : Dom.documentFragment t meth + method cloneContents : Dom.documentFragment t meth - method extractContents : Dom.documentFragment t meth + method extractContents : Dom.documentFragment t meth - method deleteContents : unit meth + method deleteContents : unit meth - method insertNode : Dom.node t -> unit meth + method insertNode : Dom.node t -> unit meth - method surroundContents : Dom.node t -> unit meth + method surroundContents : Dom.node t -> unit meth - method cloneRange : range t meth + method cloneRange : range t meth - method toString : js_string t meth - end + method toString : js_string t meth +end (** Information on current selection *) -class type selection = - object - method anchorNode : Dom.node t readonly_prop +class type selection = object + method anchorNode : Dom.node t readonly_prop - method anchorOffset : int readonly_prop + method anchorOffset : int readonly_prop - method focusNode : Dom.node t readonly_prop + method focusNode : Dom.node t readonly_prop - method focusOffset : int readonly_prop + method focusOffset : int readonly_prop - method isCollapsed : bool t readonly_prop + method isCollapsed : bool t readonly_prop - method rangeCount : int readonly_prop + method rangeCount : int readonly_prop - method getRangeAt : int -> range t meth + method getRangeAt : int -> range t meth - method collapse : bool t -> unit meth + method collapse : bool t -> unit meth - method extend : Dom.node t -> int -> unit meth + method extend : Dom.node t -> int -> unit meth - method modify : js_string t -> js_string t -> js_string t -> unit meth + method modify : js_string t -> js_string t -> js_string t -> unit meth - method collapseToStart : unit meth + method collapseToStart : unit meth - method collapseToEnd : unit meth + method collapseToEnd : unit meth - method selectAllChildren : Dom.node t -> unit meth + method selectAllChildren : Dom.node t -> unit meth - method addRange : range t -> unit meth + method addRange : range t -> unit meth - method removeRange : range t -> unit meth + method removeRange : range t -> unit meth - method removeAllRanges : unit meth + method removeAllRanges : unit meth - method deleteFromDocument : unit meth + method deleteFromDocument : unit meth - method containsNode : Dom.node t -> bool t -> bool t meth + method containsNode : Dom.node t -> bool t -> bool t meth - method toString : js_string t meth - end + method toString : js_string t meth +end (** {2 Document objects} *) -class type document = - object - inherit [element] Dom.document +class type document = object + inherit [element] Dom.document - inherit nodeSelector + inherit nodeSelector - inherit eventTarget + inherit eventTarget - method title : js_string t prop + method title : js_string t prop - method referrer : js_string t readonly_prop + method referrer : js_string t readonly_prop - method domain : js_string t prop + method domain : js_string t prop - method _URL : js_string t readonly_prop + method _URL : js_string t readonly_prop - method head : headElement t prop + method head : headElement t prop - method body : bodyElement t prop + method body : bodyElement t prop - method documentElement : htmlElement t readonly_prop + method documentElement : htmlElement t readonly_prop - method images : imageElement collection t readonly_prop + method images : imageElement collection t readonly_prop - method applets : element collection t readonly_prop + method applets : element collection t readonly_prop - method links : element collection t readonly_prop + method links : element collection t readonly_prop - method forms : formElement collection t readonly_prop + method forms : formElement collection t readonly_prop - method anchors : element collection t readonly_prop + method anchors : element collection t readonly_prop - method cookie : js_string t prop + method cookie : js_string t prop - method designMode : js_string t prop + method designMode : js_string t prop - method open_ : unit meth + method open_ : unit meth - method close : unit meth + method close : unit meth - method write : js_string t -> unit meth + method write : js_string t -> unit meth - method execCommand : js_string t -> bool t -> js_string t opt -> unit meth + method execCommand : js_string t -> bool t -> js_string t opt -> unit meth - method createRange : range t meth + method createRange : range t meth - method readyState : js_string t readonly_prop + method readyState : js_string t readonly_prop - method getElementsByClassName : js_string t -> element Dom.nodeList t meth + method getElementsByClassName : js_string t -> element Dom.nodeList t meth - method getElementsByName : js_string t -> element Dom.nodeList t meth + method getElementsByName : js_string t -> element Dom.nodeList t meth - method activeElement : element t opt readonly_prop + method activeElement : element t opt readonly_prop - method hidden : bool t readonly_prop + method hidden : bool t readonly_prop - method onfullscreenchange : (document t, event t) event_listener writeonly_prop + method onfullscreenchange : (document t, event t) event_listener writeonly_prop - method onwebkitfullscreenchange : (document t, event t) event_listener writeonly_prop + method onwebkitfullscreenchange : (document t, event t) event_listener writeonly_prop - inherit eventTarget - end + inherit eventTarget +end val document : document t (** The current document *) @@ -2026,121 +1948,116 @@ val getElementById : string -> element Js.t (** {2 Window objects} *) (** Location information *) -class type location = - object - method href : js_string t prop +class type location = object + method href : js_string t prop - method protocol : js_string t prop + method protocol : js_string t prop - method host : js_string t prop + method host : js_string t prop - method hostname : js_string t prop + method hostname : js_string t prop - method origin : js_string t optdef readonly_prop + method origin : js_string t optdef readonly_prop - method port : js_string t prop + method port : js_string t prop - method pathname : js_string t prop + method pathname : js_string t prop - method search : js_string t prop + method search : js_string t prop - method hash : js_string t prop + method hash : js_string t prop - method assign : js_string t -> unit meth + method assign : js_string t -> unit meth - method replace : js_string t -> unit meth + method replace : js_string t -> unit meth - method reload : unit meth - end + method reload : unit meth +end val location_origin : location t -> js_string t (** Browser history information *) -class type history = - object - method length : int readonly_prop +class type history = object + method length : int readonly_prop - method state : Js.Unsafe.any readonly_prop + method state : Js.Unsafe.any readonly_prop - method go : int opt -> unit meth + method go : int opt -> unit meth - method back : unit meth + method back : unit meth - method forward : unit meth + method forward : unit meth - method pushState : 'a. 'a -> js_string t -> js_string t opt -> unit meth + method pushState : 'a. 'a -> js_string t -> js_string t opt -> unit meth - method replaceState : 'a. 'a -> js_string t -> js_string t opt -> unit meth - end + method replaceState : 'a. 'a -> js_string t -> js_string t opt -> unit meth +end class type undoManager = object end (** Undo manager *) (** Navigator information *) -class type navigator = - object - method appCodeName : js_string t readonly_prop +class type navigator = object + method appCodeName : js_string t readonly_prop - method appName : js_string t readonly_prop + method appName : js_string t readonly_prop - method appVersion : js_string t readonly_prop + method appVersion : js_string t readonly_prop - method cookieEnabled : bool t readonly_prop + method cookieEnabled : bool t readonly_prop - method onLine : bool t readonly_prop + method onLine : bool t readonly_prop - method platform : js_string t readonly_prop + method platform : js_string t readonly_prop - method vendor : js_string t readonly_prop + method vendor : js_string t readonly_prop - method userAgent : js_string t readonly_prop + method userAgent : js_string t readonly_prop - method language : js_string t optdef readonly_prop + method language : js_string t optdef readonly_prop - method userLanguage : js_string t optdef readonly_prop + method userLanguage : js_string t optdef readonly_prop - method maxTouchPoints : int readonly_prop - end + method maxTouchPoints : int readonly_prop +end -class type screen = - object - method width : int readonly_prop +class type screen = object + method width : int readonly_prop - method height : int readonly_prop + method height : int readonly_prop - method availWidth : int readonly_prop + method availWidth : int readonly_prop - method availHeight : int readonly_prop - end + method availHeight : int readonly_prop +end -class type applicationCache = - object - method status : int readonly_prop +class type applicationCache = object + method status : int readonly_prop - method update : unit meth + method update : unit meth - method abort : unit meth + method abort : unit meth - method swapCache : unit meth + method swapCache : unit meth - method onchecking : (applicationCache t, event t) event_listener prop + method onchecking : (applicationCache t, event t) event_listener prop - method onerror : (applicationCache t, event t) event_listener prop + method onerror : (applicationCache t, event t) event_listener prop - method onnoupdate : (applicationCache t, event t) event_listener prop + method onnoupdate : (applicationCache t, event t) event_listener prop - method ondownloading : (applicationCache t, event t) event_listener prop + method ondownloading : (applicationCache t, event t) event_listener prop - method onprogress : (applicationCache t, event t) event_listener prop + method onprogress : (applicationCache t, event t) event_listener prop - method onupdateready : (applicationCache t, event t) event_listener prop + method onupdateready : (applicationCache t, event t) event_listener prop - method oncached : (applicationCache t, event t) event_listener prop + method oncached : (applicationCache t, event t) event_listener prop - method onobsolete : (applicationCache t, event t) event_listener prop + method onobsolete : (applicationCache t, event t) event_listener prop - inherit eventTarget - end + inherit eventTarget +end type interval_id @@ -2148,190 +2065,185 @@ type timeout_id type animation_frame_request_id -class type _URL = - object - method createObjectURL : #File.blob t -> js_string t meth +class type _URL = object + method createObjectURL : #File.blob t -> js_string t meth - method revokeObjectURL : js_string t -> unit meth - end + method revokeObjectURL : js_string t -> unit meth +end (** Specification of window objects *) -class type window = - object - inherit eventTarget +class type window = object + inherit eventTarget - method document : document t readonly_prop + method document : document t readonly_prop - method applicationCache : applicationCache t readonly_prop + method applicationCache : applicationCache t readonly_prop - method name : js_string t prop + method name : js_string t prop - method location : location t readonly_prop + method location : location t readonly_prop - method history : history t readonly_prop + method history : history t readonly_prop - method undoManager : undoManager t readonly_prop + method undoManager : undoManager t readonly_prop - method navigator : navigator t readonly_prop + method navigator : navigator t readonly_prop - method getSelection : selection t meth + method getSelection : selection t meth - method close : unit meth + method close : unit meth - method closed : bool t readonly_prop + method closed : bool t readonly_prop - method stop : unit meth + method stop : unit meth - method focus : unit meth + method focus : unit meth - method blur : unit meth + method blur : unit meth - method scroll : int -> int -> unit meth + method scroll : int -> int -> unit meth - method scrollBy : int -> int -> unit meth + method scrollBy : int -> int -> unit meth - method sessionStorage : storage t optdef readonly_prop + method sessionStorage : storage t optdef readonly_prop - method localStorage : storage t optdef readonly_prop + method localStorage : storage t optdef readonly_prop - method top : window t readonly_prop + method top : window t readonly_prop - method parent : window t readonly_prop + method parent : window t readonly_prop - method frameElement : element t opt readonly_prop + method frameElement : element t opt readonly_prop - method open_ : js_string t -> js_string t -> js_string t opt -> window t opt meth + method open_ : js_string t -> js_string t -> js_string t opt -> window t opt meth - method alert : js_string t -> unit meth + method alert : js_string t -> unit meth - method confirm : js_string t -> bool t meth + method confirm : js_string t -> bool t meth - method prompt : js_string t -> js_string t -> js_string t opt meth + method prompt : js_string t -> js_string t -> js_string t opt meth - method print : unit meth + method print : unit meth - method setInterval : (unit -> unit) Js.callback -> float -> interval_id meth + method setInterval : (unit -> unit) Js.callback -> float -> interval_id meth - method clearInterval : interval_id -> unit meth + method clearInterval : interval_id -> unit meth - method setTimeout : (unit -> unit) Js.callback -> float -> timeout_id meth + method setTimeout : (unit -> unit) Js.callback -> float -> timeout_id meth - method clearTimeout : timeout_id -> unit meth + method clearTimeout : timeout_id -> unit meth - method requestAnimationFrame : - (float -> unit) Js.callback -> animation_frame_request_id meth + method requestAnimationFrame : + (float -> unit) Js.callback -> animation_frame_request_id meth - method cancelAnimationFrame : animation_frame_request_id -> unit meth + method cancelAnimationFrame : animation_frame_request_id -> unit meth - method screen : screen t readonly_prop + method screen : screen t readonly_prop - method innerWidth : int readonly_prop + method innerWidth : int readonly_prop - method innerHeight : int readonly_prop + method innerHeight : int readonly_prop - method outerWidth : int readonly_prop + method outerWidth : int readonly_prop - method outerHeight : int readonly_prop + method outerHeight : int readonly_prop - method getComputedStyle : #element t -> cssStyleDeclaration t meth + method getComputedStyle : #element t -> cssStyleDeclaration t meth - method getComputedStyle_pseudoElt : - #element t -> js_string t -> cssStyleDeclaration t meth + method getComputedStyle_pseudoElt : + #element t -> js_string t -> cssStyleDeclaration t meth - method atob : js_string t -> js_string t meth + method atob : js_string t -> js_string t meth - method btoa : js_string t -> js_string t meth + method btoa : js_string t -> js_string t meth - method onload : (window t, event t) event_listener prop + method onload : (window t, event t) event_listener prop - method onunload : (window t, event t) event_listener prop + method onunload : (window t, event t) event_listener prop - method onbeforeunload : (window t, event t) event_listener prop + method onbeforeunload : (window t, event t) event_listener prop - method onblur : (window t, focusEvent t) event_listener prop + method onblur : (window t, focusEvent t) event_listener prop - method onfocus : (window t, focusEvent t) event_listener prop + method onfocus : (window t, focusEvent t) event_listener prop - method onresize : (window t, event t) event_listener prop + method onresize : (window t, event t) event_listener prop - method onorientationchange : (window t, event t) event_listener prop + method onorientationchange : (window t, event t) event_listener prop - method onpopstate : (window t, popStateEvent t) event_listener prop + method onpopstate : (window t, popStateEvent t) event_listener prop - method onhashchange : (window t, hashChangeEvent t) event_listener prop + method onhashchange : (window t, hashChangeEvent t) event_listener prop - method ononline : (window t, event t) event_listener writeonly_prop + method ononline : (window t, event t) event_listener writeonly_prop - method onoffline : (window t, event t) event_listener writeonly_prop + method onoffline : (window t, event t) event_listener writeonly_prop - method _URL : _URL t readonly_prop + method _URL : _URL t readonly_prop - method devicePixelRatio : float readonly_prop - end + method devicePixelRatio : float readonly_prop +end val window : window t (** The current window *) (* {2 Frames } *) -class type frameSetElement = - object - inherit element +class type frameSetElement = object + inherit element - method cols : js_string t prop + method cols : js_string t prop - method rows : js_string t prop - end + method rows : js_string t prop +end -class type frameElement = - object - inherit element +class type frameElement = object + inherit element - method frameBorder : js_string t prop + method frameBorder : js_string t prop - method longDesc : js_string t prop + method longDesc : js_string t prop - method marginHeight : js_string t prop + method marginHeight : js_string t prop - method marginWidth : js_string t prop + method marginWidth : js_string t prop - method name : js_string t prop + method name : js_string t prop - method noResize : bool t prop + method noResize : bool t prop - method scrolling : js_string t prop + method scrolling : js_string t prop - method src : js_string t prop + method src : js_string t prop - method contentDocument : document t opt readonly_prop - end + method contentDocument : document t opt readonly_prop +end -class type iFrameElement = - object - inherit element +class type iFrameElement = object + inherit element - method frameBorder : js_string t prop + method frameBorder : js_string t prop - method height : js_string t prop + method height : js_string t prop - method width : js_string t prop + method width : js_string t prop - method longDesc : js_string t prop + method longDesc : js_string t prop - method marginHeight : js_string t prop + method marginHeight : js_string t prop - method marginWidth : js_string t prop + method marginWidth : js_string t prop - method name : js_string t prop + method name : js_string t prop - method scrolling : js_string t prop + method scrolling : js_string t prop - method src : js_string t prop + method src : js_string t prop - method contentDocument : document t opt readonly_prop + method contentDocument : document t opt readonly_prop - method contentWindow : window t readonly_prop - end + method contentWindow : window t readonly_prop +end (****) @@ -3208,7 +3120,7 @@ val js_array_of_collection : #element collection Js.t -> #element Js.t Js.js_arr (** {2 Deprecated function.} *) val _requestAnimationFrame : (unit -> unit) Js.callback -> unit - [@@ocaml.deprecated "[since 2.6] Use [Dom_html.window##requestAnimationFrame] instead."] +[@@ocaml.deprecated "[since 2.6] Use [Dom_html.window##requestAnimationFrame] instead."] (** Call the appropriate [requestAnimationFrame] method variant (depending on the navigator), or sleep for a short amount of time when there no such method is provided. We currently diff --git a/lib/js_of_ocaml/dom_svg.ml b/lib/js_of_ocaml/dom_svg.ml index 7382a5f0f1..58cbe8fa65 100644 --- a/lib/js_of_ocaml/dom_svg.ml +++ b/lib/js_of_ocaml/dom_svg.ml @@ -31,12 +31,11 @@ type error_code = | INVALID_VALUE_ERR | MATRIX_NOT_INVERTABLE -class type svg_error = - object - inherit Js.error +class type svg_error = object + inherit Js.error - method code : error_code t readonly_prop - end + method code : error_code t readonly_prop +end exception SVGError of svg_error @@ -163,47 +162,44 @@ type suspendHandleID (****) -class type ['a] animated = - object - method baseVal : 'a prop +class type ['a] animated = object + method baseVal : 'a prop - method animVal : 'a prop - end + method animVal : 'a prop +end -class type ['a] list = - object - method numberOfItems : int readonly_prop +class type ['a] list = object + method numberOfItems : int readonly_prop - method clear : unit meth + method clear : unit meth - method initialize : 'a -> 'a meth + method initialize : 'a -> 'a meth - method getItem : int -> 'a meth + method getItem : int -> 'a meth - method insertItemBefore : 'a -> int -> 'a meth + method insertItemBefore : 'a -> int -> 'a meth - method replaceItem : 'a -> int -> 'a meth + method replaceItem : 'a -> int -> 'a meth - method removeItem : int -> 'a meth + method removeItem : int -> 'a meth - method appendItem : 'a -> 'a meth - end + method appendItem : 'a -> 'a meth +end (****) (* interface SVGElement *) -class type element = - object - inherit Dom.element +class type element = object + inherit Dom.element - method id : js_string t prop + method id : js_string t prop - method xmlbase : js_string t prop + method xmlbase : js_string t prop - method ownerSVGElement : svgElement t readonly_prop + method ownerSVGElement : svgElement t readonly_prop - method viewportElement : element t readonly_prop - end + method viewportElement : element t readonly_prop +end (* interface SVGAnimatedString *) and animatedString = [js_string t] animated @@ -230,20 +226,19 @@ and numberList = [number t] list and animatedNumberList = [numberList t] animated (* interface SVGLength *) -and length = - object - method unitType : lengthUnitType readonly_prop +and length = object + method unitType : lengthUnitType readonly_prop - method value : float prop + method value : float prop - method valueInSpecifiedUnits : float prop + method valueInSpecifiedUnits : float prop - method valueAsString : js_string t prop + method valueAsString : js_string t prop - method newValueSpecifiedUnits : lengthUnitType -> float -> unit meth + method newValueSpecifiedUnits : lengthUnitType -> float -> unit meth - method convertToSpecifiedUnits : lengthUnitType -> unit meth - end + method convertToSpecifiedUnits : lengthUnitType -> unit meth +end (* interface SVGAnimatedLength *) and animatedLength = [length t] animated @@ -255,20 +250,19 @@ and lengthList = [length t] list and animatedLengthList = [lengthList t] animated (* interface SVGAngle *) -and angle = - object - method unitType : angleUnitType readonly_prop +and angle = object + method unitType : angleUnitType readonly_prop - method value : float prop + method value : float prop - method valueInSpecifiedUnits : float prop + method valueInSpecifiedUnits : float prop - method valueAsString : js_string t prop + method valueAsString : js_string t prop - method newValueSpecifiedUnits : angleUnitType -> float -> unit meth + method newValueSpecifiedUnits : angleUnitType -> float -> unit meth - method convertToSpecifiedUnits : angleUnitType -> unit meth - end + method convertToSpecifiedUnits : angleUnitType -> unit meth +end (* interface SVGAnimatedAngle *) and animatedAngle = [angle t] animated @@ -277,1009 +271,953 @@ and animatedAngle = [angle t] animated and rgbColor = object end (* interface SVGColor *) -and color = - object - (* XXX inherit cssValue *) - method colorType : colorType readonly_prop +and color = object + (* XXX inherit cssValue *) + method colorType : colorType readonly_prop - method rgbColor : rgbColor t readonly_prop + method rgbColor : rgbColor t readonly_prop - method iccColor : iccColor t readonly_prop + method iccColor : iccColor t readonly_prop - method setRGBColor : js_string t -> unit meth + method setRGBColor : js_string t -> unit meth - method setRGBColorICCColor : js_string t -> js_string t -> unit meth + method setRGBColorICCColor : js_string t -> js_string t -> unit meth - method setColor : colorType -> js_string t -> js_string t -> unit meth - end + method setColor : colorType -> js_string t -> js_string t -> unit meth +end (* interface SVGICCColor *) -and iccColor = - object - method colorProfile : js_string t prop +and iccColor = object + method colorProfile : js_string t prop - method colors : numberList t readonly_prop - end + method colors : numberList t readonly_prop +end (* interface SVGRect *) -and rect = - object - method x : float prop +and rect = object + method x : float prop - method y : float prop + method y : float prop - method width : float prop + method width : float prop - method height : float prop - end + method height : float prop +end (* interface SVGAnimatedRect *) and animatedRect = [rect t] animated (* interface SVGStylable *) -and stylable = - object - method className : animatedString t readonly_prop +and stylable = object + method className : animatedString t readonly_prop - method style : Dom_html.cssStyleDeclaration t readonly_prop - (* CSSValue getPresentationAttribute(in DOMString name); *) - end + method style : Dom_html.cssStyleDeclaration t readonly_prop + (* CSSValue getPresentationAttribute(in DOMString name); *) +end (* interface SVGLocatable *) -and locatable = - object - method nearestViewportElement : element t readonly_prop +and locatable = object + method nearestViewportElement : element t readonly_prop - method farthestViewportElement : element t readonly_prop + method farthestViewportElement : element t readonly_prop - method getBBox : rect t meth + method getBBox : rect t meth - method getCTM : matrix t meth + method getCTM : matrix t meth - method getScreenCTM : matrix t meth + method getScreenCTM : matrix t meth - method getTransformToElement : element t -> matrix t meth - end + method getTransformToElement : element t -> matrix t meth +end (* interface SVGTransformable *) -and transformable = - object - inherit locatable +and transformable = object + inherit locatable - method transform : animatedTransformList t readonly_prop - end + method transform : animatedTransformList t readonly_prop +end (* interface SVGTests *) -and tests = - object - method requiredFeatures : stringList t readonly_prop +and tests = object + method requiredFeatures : stringList t readonly_prop - method requiredExtensions : stringList t readonly_prop + method requiredExtensions : stringList t readonly_prop - method systemLanguage : stringList t readonly_prop + method systemLanguage : stringList t readonly_prop - method hasExtension : js_string t -> bool t meth - end + method hasExtension : js_string t -> bool t meth +end (* interface SVGLangSpace *) -and langSpace = - object - method xmllang : js_string t prop +and langSpace = object + method xmllang : js_string t prop - method xmlspace : js_string t prop - end + method xmlspace : js_string t prop +end (* interface SVGExternalResourcesRequired *) -and externalResourcesRequired = - object - method externalResourcesRequired : animatedBoolean t readonly_prop - end +and externalResourcesRequired = object + method externalResourcesRequired : animatedBoolean t readonly_prop +end (* interface SVGFitToViewBox *) -and fitToViewBox = - object - method viewBox : animatedRect t readonly_prop +and fitToViewBox = object + method viewBox : animatedRect t readonly_prop - method preserveAspectRatio : animatedPreserveAspectRatio t readonly_prop - end + method preserveAspectRatio : animatedPreserveAspectRatio t readonly_prop +end (* interface SVGZoomAndPan *) -and zoomAndPan = - object - method zoomAndPan : zoomAndPanType prop - end +and zoomAndPan = object + method zoomAndPan : zoomAndPanType prop +end (* interface SVGViewSpec *) -and viewSpec = - object - inherit zoomAndPan +and viewSpec = object + inherit zoomAndPan - inherit fitToViewBox + inherit fitToViewBox - method transform : transformList t readonly_prop + method transform : transformList t readonly_prop - method viewTarget : element t readonly_prop + method viewTarget : element t readonly_prop - method viewBoxString : js_string t readonly_prop + method viewBoxString : js_string t readonly_prop - method preserveAspectRatioString : js_string t readonly_prop + method preserveAspectRatioString : js_string t readonly_prop - method transformString : js_string t readonly_prop + method transformString : js_string t readonly_prop - method viewTargetString : js_string t readonly_prop - end + method viewTargetString : js_string t readonly_prop +end (* interface SVGURIReference *) -and uriReference = - object - method href : animatedString t readonly_prop - end +and uriReference = object + method href : animatedString t readonly_prop +end (* interface SVGCSSRule : CSSRule *) (* const unsigned short COLOR_PROFILE_RULE = 7; *) (* }; *) (* interface SVGDocument *) -and document = - object - inherit [element] Dom.document +and document = object + inherit [element] Dom.document - (*XXX inherit documentEvent *) - method title : js_string t prop + (*XXX inherit documentEvent *) + method title : js_string t prop - method referrer : js_string t readonly_prop + method referrer : js_string t readonly_prop - method domain : js_string t prop + method domain : js_string t prop - method _URL : js_string t readonly_prop + method _URL : js_string t readonly_prop - method rootElement : svgElement t opt readonly_prop - (* rootElement will be null or undefined in an html context *) - end + method rootElement : svgElement t opt readonly_prop + (* rootElement will be null or undefined in an html context *) +end (* interface SVGSVGElement *) -and svgElement = - object - inherit element +and svgElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit locatable + inherit locatable - inherit fitToViewBox + inherit fitToViewBox - inherit zoomAndPan + inherit zoomAndPan - (*XXX inherit documentevent, viewcss, documentcss *) - method x : animatedLength t readonly_prop + (*XXX inherit documentevent, viewcss, documentcss *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method contentScriptType : js_string t prop + method contentScriptType : js_string t prop - method contentStyleType : js_string t prop + method contentStyleType : js_string t prop - method viewport : rect t readonly_prop + method viewport : rect t readonly_prop - method pixelUnitToMillimeterX : float readonly_prop + method pixelUnitToMillimeterX : float readonly_prop - method pixelUnitToMillimeterY : float readonly_prop + method pixelUnitToMillimeterY : float readonly_prop - method screenPixelUnitToMillimeterX : float readonly_prop + method screenPixelUnitToMillimeterX : float readonly_prop - method screenPixelUnitToMillimeterY : float readonly_prop + method screenPixelUnitToMillimeterY : float readonly_prop - method useCurrentView : bool t readonly_prop + method useCurrentView : bool t readonly_prop - method currentView : viewSpec t readonly_prop + method currentView : viewSpec t readonly_prop - method currentScale : float prop + method currentScale : float prop - method currentTranslate : point t readonly_prop + method currentTranslate : point t readonly_prop - method suspendRedraw : int -> suspendHandleID meth + method suspendRedraw : int -> suspendHandleID meth - method unsuspendRedraw : suspendHandleID -> unit meth + method unsuspendRedraw : suspendHandleID -> unit meth - method unsuspendRedrawAll : unit meth + method unsuspendRedrawAll : unit meth - method forceRedraw : unit meth + method forceRedraw : unit meth - method pauseAnimations : unit meth + method pauseAnimations : unit meth - method unpauseAnimations : unit meth + method unpauseAnimations : unit meth - method animationsPaused : bool t meth + method animationsPaused : bool t meth - method getCurrentTime : float meth + method getCurrentTime : float meth - method setCurrentTime : int -> unit meth + method setCurrentTime : int -> unit meth - method getIntersectionList : rect t -> element t -> element Dom.nodeList t meth + method getIntersectionList : rect t -> element t -> element Dom.nodeList t meth - method getEnclosureList : rect t -> element t -> element Dom.nodeList t meth + method getEnclosureList : rect t -> element t -> element Dom.nodeList t meth - method checkIntersection : element t -> rect t -> bool t + method checkIntersection : element t -> rect t -> bool t - method checkEnclosure : element t -> rect t -> bool t + method checkEnclosure : element t -> rect t -> bool t - method deselectAll : unit meth + method deselectAll : unit meth - method createSVGNumber : number t meth + method createSVGNumber : number t meth - method createSVGLength : length t meth + method createSVGLength : length t meth - method createSVGAngle : angle t meth + method createSVGAngle : angle t meth - method createSVGPoint : point t meth + method createSVGPoint : point t meth - method createSVGMatrix : matrix t meth + method createSVGMatrix : matrix t meth - method createSVGRect : rect t meth + method createSVGRect : rect t meth - method createSVGTransform : transform t meth + method createSVGTransform : transform t meth - method createSVGTransformFromMatrix : matrix t -> transform t meth + method createSVGTransformFromMatrix : matrix t -> transform t meth - method getElementById : js_string t -> Dom.element t meth - end + method getElementById : js_string t -> Dom.element t meth +end (* interface SVGGElement *) -and gElement = - object - inherit element +and gElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit Dom_html.eventTarget - end + inherit Dom_html.eventTarget +end (* interface SVGDefsElement *) -and defsElement = - object - inherit element +and defsElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - (* XXXXXXX ? inherit Dom_html.eventTarget *) - end + inherit transformable + (* XXXXXXX ? inherit Dom_html.eventTarget *) +end (* interface SVGDescElement *) -and descElement = - object - inherit element +and descElement = object + inherit element - inherit langSpace + inherit langSpace - inherit stylable - (* XXXXXXX ? inherit Dom_html.eventTarget *) - end + inherit stylable + (* XXXXXXX ? inherit Dom_html.eventTarget *) +end (* interface SVGTitleElement *) -and titleElement = - object - inherit element +and titleElement = object + inherit element - inherit langSpace + inherit langSpace - inherit stylable - end + inherit stylable +end (* interface SVGSymbolElement *) -and symbolElement = - object - inherit element +and symbolElement = object + inherit element - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit fitToViewBox + inherit fitToViewBox - inherit Dom_html.eventTarget - end + inherit Dom_html.eventTarget +end (* interface SVGUseElement *) -and useElement = - object - inherit element +and useElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method instanceRoot : elementInstance t readonly_prop + method instanceRoot : elementInstance t readonly_prop - method animatedInstanceRoot : elementInstance t readonly_prop - end + method animatedInstanceRoot : elementInstance t readonly_prop +end -and elementInstance = - object - inherit Dom_html.eventTarget +and elementInstance = object + inherit Dom_html.eventTarget - method correspondingElement : element t readonly_prop + method correspondingElement : element t readonly_prop - method correspondingUseElement : useElement t readonly_prop + method correspondingUseElement : useElement t readonly_prop - method parentNode : elementInstance t readonly_prop + method parentNode : elementInstance t readonly_prop - method childNodes : elementInstanceList t readonly_prop + method childNodes : elementInstanceList t readonly_prop - method firstChild : elementInstance t readonly_prop + method firstChild : elementInstance t readonly_prop - method lastChild : elementInstance t readonly_prop + method lastChild : elementInstance t readonly_prop - method previousSibling : elementInstance t readonly_prop + method previousSibling : elementInstance t readonly_prop - method nextSibling : elementInstance t readonly_prop - end + method nextSibling : elementInstance t readonly_prop +end (* interface SVGElementInstanceList *) -and elementInstanceList = - object - method length : int readonly_prop +and elementInstanceList = object + method length : int readonly_prop - method item : int -> elementInstance t - end + method item : int -> elementInstance t +end (* interface SVGImageElement *) -and imageElement = - object - inherit element +and imageElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - (* readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio *) - end + method height : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio *) +end -and switchElement = - object - inherit element +and switchElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - end + inherit transformable +end (* XXX deprecated => interface GetSVGDocument => SVGDocument getSVGDocument() *) (* interface SVGStyleElement *) -and styleElement = - object - inherit element +and styleElement = object + inherit element - inherit langSpace + inherit langSpace - method type_ : js_string t prop + method type_ : js_string t prop - method media : js_string t prop + method media : js_string t prop - method title : js_string t prop - end + method title : js_string t prop +end (* interface SVGPoint *) -and point = - object - method x : float readonly_prop +and point = object + method x : float readonly_prop - method y : float readonly_prop + method y : float readonly_prop - method matrixTransform : matrix t -> point t meth - end + method matrixTransform : matrix t -> point t meth +end (* interface SVGPointList *) and pointList = [point t] list (* interface SVGMatrix *) -and matrix = - object - method a : float readonly_prop +and matrix = object + method a : float readonly_prop - method b : float readonly_prop + method b : float readonly_prop - method c : float readonly_prop + method c : float readonly_prop - method d : float readonly_prop + method d : float readonly_prop - method e : float readonly_prop + method e : float readonly_prop - method f : float readonly_prop + method f : float readonly_prop - method multiply : matrix t -> matrix t meth + method multiply : matrix t -> matrix t meth - method inverse : matrix t meth + method inverse : matrix t meth - method translate : float -> float -> matrix t meth + method translate : float -> float -> matrix t meth - method scale : float -> matrix t meth + method scale : float -> matrix t meth - method scaleNonUniform : float -> float -> matrix t meth + method scaleNonUniform : float -> float -> matrix t meth - method rotate : float -> matrix t meth + method rotate : float -> matrix t meth - method rotateFromVector : float -> float -> matrix t meth + method rotateFromVector : float -> float -> matrix t meth - method flipX : matrix t meth + method flipX : matrix t meth - method flipY : matrix t meth + method flipY : matrix t meth - method skewX : float -> matrix t meth + method skewX : float -> matrix t meth - method skewY : float -> matrix t meth - end + method skewY : float -> matrix t meth +end (* interface SVGTransform *) -and transform = - object - method _type : transformType readonly_prop +and transform = object + method _type : transformType readonly_prop - method matrix : matrix t readonly_prop + method matrix : matrix t readonly_prop - method angle : float readonly_prop + method angle : float readonly_prop - method setMatrix : matrix t -> unit meth + method setMatrix : matrix t -> unit meth - method setTranslate : float -> float -> unit meth + method setTranslate : float -> float -> unit meth - method setScale : float -> float -> unit meth + method setScale : float -> float -> unit meth - method setRotate : float -> float -> float -> unit meth + method setRotate : float -> float -> float -> unit meth - method setSkewX : float -> unit meth + method setSkewX : float -> unit meth - method setSkewY : float -> unit meth - end + method setSkewY : float -> unit meth +end (* interface SVGTransformList *) -and transformList = - object - inherit [transform t] list +and transformList = object + inherit [transform t] list - method createSVGTransformFromMatrix : matrix -> transform t meth + method createSVGTransformFromMatrix : matrix -> transform t meth - method consolidate : transform t meth - end + method consolidate : transform t meth +end (* interface SVGAnimatedTransformList *) and animatedTransformList = [transformList t] animated (* interface SVGPreserveAspectRatio *) -and preserveAspectRatio = - object - method align : alignmentType readonly_prop +and preserveAspectRatio = object + method align : alignmentType readonly_prop - method meetOrSlice : meetOrSliceType readonly_prop - end + method meetOrSlice : meetOrSliceType readonly_prop +end (* interface SVGAnimatedPreserveAspectRatio *) and animatedPreserveAspectRatio = [preserveAspectRatio t] animated (* interface SVGPathSeg *) -and pathSeg = - object - method pathSegType : pathSegmentType readonly_prop +and pathSeg = object + method pathSegType : pathSegmentType readonly_prop - method pathSegTypeAsLetter : js_string t readonly_prop - end + method pathSegTypeAsLetter : js_string t readonly_prop +end (* interface SVGPathSegClosePath *) and pathSegClosePath = pathSeg (* interface SVGPathSegMovetoAbs *) (* interface SVGPathSegMovetoRel *) -and pathSegMoveto = - object - inherit pathSeg +and pathSegMoveto = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop - end + method y : float prop +end (* interface SVGPathSegLinetoAbs *) (* interface SVGPathSegLinetoRel *) -and pathSegLineto = - object - inherit pathSeg +and pathSegLineto = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop - end + method y : float prop +end (* interface SVGPathSegCurvetoCubicAbs *) (* interface SVGPathSegCurvetoCubicRel *) -and pathSegCurvetoCubic = - object - inherit pathSeg +and pathSegCurvetoCubic = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method x1 : float prop + method x1 : float prop - method y1 : float prop + method y1 : float prop - method x2 : float prop + method x2 : float prop - method y2 : float prop - end + method y2 : float prop +end (* interface SVGPathSegCurvetoQuadraticAbs *) (* interface SVGPathSegCurvetoQuadraticRel *) -and pathSegCurvetoQuadratic = - object - inherit pathSeg +and pathSegCurvetoQuadratic = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method x1 : float prop + method x1 : float prop - method y1 : float prop - end + method y1 : float prop +end (* interface SVGPathSegArcAbs *) (* interface SVGPathSegArcRel*) -and pathSegArc = - object - inherit pathSeg +and pathSegArc = object + inherit pathSeg - method y : float prop + method y : float prop - method r1 : float prop + method r1 : float prop - method r2 : float prop + method r2 : float prop - method angle : float prop + method angle : float prop - method largeArcFlag : bool t prop + method largeArcFlag : bool t prop - method sweepFlag : bool t prop - end + method sweepFlag : bool t prop +end (* interface SVGPathSegLinetoHorizontalAbs *) (* interface SVGPathSegLinetoHorizontalRel *) -and pathSegLinetoHorizontal = - object - inherit pathSeg +and pathSegLinetoHorizontal = object + inherit pathSeg - method x : float - end + method x : float +end (* interface SVGPathSegLinetoVerticalAbs *) (* interface SVGPathSegLinetoVerticalRel *) -and pathSegLinetoVertical = - object - inherit pathSeg +and pathSegLinetoVertical = object + inherit pathSeg - method y : float - end + method y : float +end -and pathSegCurvetoCubicSmooth = - object - inherit pathSeg +and pathSegCurvetoCubicSmooth = object + inherit pathSeg - method x : float + method x : float - method y : float + method y : float - method x2 : float + method x2 : float - method y2 : float - end + method y2 : float +end (* interface SVGPathSegCurvetoQuadraticSmoothAbs *) (* interface SVGPathSegCurvetoQuadraticSmoothRel *) -and pathSegCurvetoQuadraticSmooth = - object - inherit pathSeg +and pathSegCurvetoQuadraticSmooth = object + inherit pathSeg - method x : float + method x : float - method y : float - end + method y : float +end and pathSegList = [pathSeg t] list (* interface SVGAnimatedPathData *) -and animatedPathData = - object - method pathSegList : pathSegList t prop +and animatedPathData = object + method pathSegList : pathSegList t prop - method normalizedPathSegList : pathSegList t prop + method normalizedPathSegList : pathSegList t prop - method animatedPathSegList : pathSegList t prop + method animatedPathSegList : pathSegList t prop - method animatedNormalizedPathSegList : pathSegList t prop - end + method animatedNormalizedPathSegList : pathSegList t prop +end (* interface SVGPathElement *) -and pathElement = - object - inherit element +and pathElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPathData + inherit animatedPathData - method pathLength : animatedNumber t readonly_prop + method pathLength : animatedNumber t readonly_prop - method getTotalLength : float meth + method getTotalLength : float meth - method getPointAtLength : float -> point t meth + method getPointAtLength : float -> point t meth - method getPathSegAtLength : float -> int + method getPathSegAtLength : float -> int - method createSVGPathSegClosePath : pathSegClosePath meth + method createSVGPathSegClosePath : pathSegClosePath meth - method createSVGPathSegMovetoAbs : float -> float -> pathSegMoveto meth + method createSVGPathSegMovetoAbs : float -> float -> pathSegMoveto meth - method createSVGPathSegMovetoRel : float -> float -> pathSegMoveto meth + method createSVGPathSegMovetoRel : float -> float -> pathSegMoveto meth - method createSVGPathSegLinetoAbs : float -> float -> pathSegLineto meth + method createSVGPathSegLinetoAbs : float -> float -> pathSegLineto meth - method createSVGPathSegLinetoRel : float -> float -> pathSegLineto meth + method createSVGPathSegLinetoRel : float -> float -> pathSegLineto meth - method createSVGPathSegCurvetoCubicAbs : - float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth + method createSVGPathSegCurvetoCubicAbs : + float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth - method createSVGPathSegCurvetoCubicRel : - float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth + method createSVGPathSegCurvetoCubicRel : + float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth - method createSVGPathSegCurvetoQuadraticAbs : - float -> float -> float -> float -> pathSegCurvetoQuadratic meth + method createSVGPathSegCurvetoQuadraticAbs : + float -> float -> float -> float -> pathSegCurvetoQuadratic meth - method createSVGPathSegCurvetoQuadraticRel : - float -> float -> float -> float -> pathSegCurvetoQuadratic meth + method createSVGPathSegCurvetoQuadraticRel : + float -> float -> float -> float -> pathSegCurvetoQuadratic meth - method createSVGPathSegArcAbs : - float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth + method createSVGPathSegArcAbs : + float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth - method createSVGPathSegArcRel : - float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth + method createSVGPathSegArcRel : + float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth - method createSVGPathSegLinetoHorizontalAbs : float -> pathSegLinetoHorizontal meth + method createSVGPathSegLinetoHorizontalAbs : float -> pathSegLinetoHorizontal meth - method createSVGPathSegLinetoHorizontalRel : float -> pathSegLinetoHorizontal meth + method createSVGPathSegLinetoHorizontalRel : float -> pathSegLinetoHorizontal meth - method createSVGPathSegLinetoVerticalAbs : float -> pathSegLinetoVertical meth + method createSVGPathSegLinetoVerticalAbs : float -> pathSegLinetoVertical meth - method createSVGPathSegLinetoVerticalRel : float -> pathSegLinetoVertical meth + method createSVGPathSegLinetoVerticalRel : float -> pathSegLinetoVertical meth - method createSVGPathSegCurvetoCubicSmoothAbs : - float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth + method createSVGPathSegCurvetoCubicSmoothAbs : + float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth - method createSVGPathSegCurvetoCubicSmoothRel : - float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth + method createSVGPathSegCurvetoCubicSmoothRel : + float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth - method createSVGPathSegCurvetoQuadraticSmoothAbs : - float -> float -> pathSegCurvetoQuadraticSmooth meth + method createSVGPathSegCurvetoQuadraticSmoothAbs : + float -> float -> pathSegCurvetoQuadraticSmooth meth - method createSVGPathSegCurvetoQuadraticSmoothRel : - float -> float -> pathSegCurvetoQuadraticSmooth meth - end + method createSVGPathSegCurvetoQuadraticSmoothRel : + float -> float -> pathSegCurvetoQuadraticSmooth meth +end (* interface SVGRectElement *) -and rectElement = - object - inherit element +and rectElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method rx : animatedLength t readonly_prop + method rx : animatedLength t readonly_prop - method ry : animatedLength t readonly_prop - end + method ry : animatedLength t readonly_prop +end (* interface SVGCircleElement *) -and circleElement = - object - inherit element +and circleElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method r : animatedLength t readonly_prop - end + method r : animatedLength t readonly_prop +end (* interface SVGEllipseElement *) -and ellipseElement = - object - inherit element +and ellipseElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method rx : animatedLength t readonly_prop + method rx : animatedLength t readonly_prop - method ry : animatedLength t readonly_prop - end + method ry : animatedLength t readonly_prop +end (* interface SVGLineElement *) -class type lineElement = - object - inherit element +class type lineElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit Dom_html.eventTarget + inherit Dom_html.eventTarget - method x1 : animatedLength t readonly_prop + method x1 : animatedLength t readonly_prop - method y1 : animatedLength t readonly_prop + method y1 : animatedLength t readonly_prop - method x2 : animatedLength t readonly_prop + method x2 : animatedLength t readonly_prop - method y2 : animatedLength t readonly_prop - end + method y2 : animatedLength t readonly_prop +end (* interface SVGAnimatedPoints *) -and animatedPoints = - object - method points : pointList t readonly_prop +and animatedPoints = object + method points : pointList t readonly_prop - method animatedpoints : pointList t readonly_prop - end + method animatedpoints : pointList t readonly_prop +end (* interface SVGPolylineElement *) -and polyLineElement = - object - inherit element +and polyLineElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPoints - end + inherit animatedPoints +end (* interface SVGPolygonElement *) -and polygonElement = - object - inherit element +and polygonElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPoints - end + inherit animatedPoints +end (* interface SVGTextContentElement *) -and textContentElement = - object - inherit element +and textContentElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit Dom_html.eventTarget + inherit Dom_html.eventTarget - method textLength : animatedLength t readonly_prop + method textLength : animatedLength t readonly_prop - method lengthAdjust : lengthAdjust animated t readonly_prop + method lengthAdjust : lengthAdjust animated t readonly_prop - method getNumberOfChars : int meth + method getNumberOfChars : int meth - method getComputedTextLength : float meth + method getComputedTextLength : float meth - method getSubStringLength : int -> int -> float meth + method getSubStringLength : int -> int -> float meth - method getStartPositionOfChar : int -> point t meth + method getStartPositionOfChar : int -> point t meth - method getEndPositionOfChar : int -> point t meth + method getEndPositionOfChar : int -> point t meth - method getExtentOfChar : int -> rect t meth + method getExtentOfChar : int -> rect t meth - method getRotationOfChar : int -> float meth + method getRotationOfChar : int -> float meth - method getCharNumAtPosition : point -> int meth + method getCharNumAtPosition : point -> int meth - method selectSubString : int -> int -> unit meth - end + method selectSubString : int -> int -> unit meth +end (* interface SVGTextPositioningElement *) -and textPositioningElement = - object - inherit textContentElement +and textPositioningElement = object + inherit textContentElement - method x : animatedLengthList t readonly_prop + method x : animatedLengthList t readonly_prop - method y : animatedLengthList t readonly_prop + method y : animatedLengthList t readonly_prop - method dx : animatedLengthList t readonly_prop + method dx : animatedLengthList t readonly_prop - method dy : animatedLengthList t readonly_prop + method dy : animatedLengthList t readonly_prop - method rotate : animatedNumberList t readonly_prop - end + method rotate : animatedNumberList t readonly_prop +end (* interface SVGTextElement *) -and textElement = - object - inherit textPositioningElement +and textElement = object + inherit textPositioningElement - inherit transformable - end + inherit transformable +end and tspanElement = textPositioningElement -and trefElement = - object - inherit textPositioningElement +and trefElement = object + inherit textPositioningElement - inherit uriReference - end + inherit uriReference +end (* interface SVGTextPathElement *) and textPathElementMethod = [textPathMethodType] animated and textPathElementSpacing = [textPathSpacingType] animated -and textPathElement = - object - inherit textContentElement +and textPathElement = object + inherit textContentElement - inherit uriReference + inherit uriReference - method startOffset : animatedLength t readonly_prop + method startOffset : animatedLength t readonly_prop - method method_ : textPathElementMethod readonly_prop + method method_ : textPathElementMethod readonly_prop - method spacing : textPathElementSpacing readonly_prop - end + method spacing : textPathElementSpacing readonly_prop +end (* interface SVGAltGlyphElement *) -and altGlyphElement = - object - inherit textPositioningElement +and altGlyphElement = object + inherit textPositioningElement - inherit uriReference + inherit uriReference - method glyphRef : js_string t prop + method glyphRef : js_string t prop - method format : js_string t prop - end + method format : js_string t prop +end (* interface SVGAltGlyphDefElement *) and altGlyphDefElement = element @@ -1288,26 +1226,25 @@ and altGlyphDefElement = element and altGlyphItemElement = element (* interface SVGGlyphRefElement *) -and glyphRefElement = - object - inherit element +and glyphRefElement = object + inherit element - inherit uriReference + inherit uriReference - inherit stylable + inherit stylable - method glyphRef : js_string t prop + method glyphRef : js_string t prop - method format : js_string t prop + method format : js_string t prop - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method dx : float prop + method dx : float prop - method dy : float prop - end + method dy : float prop +end (* interface SVGPaint : SVGColor { *) @@ -1376,160 +1313,152 @@ and glyphRefElement = (* interface SVGGradientElement *) and animatedSpreadMethod = [spreadMethodType] animated -and gradientElement = - object - inherit element +and gradientElement = object + inherit element - inherit uriReference + inherit uriReference - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration gradientUnits; *) - method gradientTransform : animatedTransformList t readonly_prop + (* readonly attribute SVGAnimatedEnumeration gradientUnits; *) + method gradientTransform : animatedTransformList t readonly_prop - method spreadMethod : animatedSpreadMethod t readonly_prop - end + method spreadMethod : animatedSpreadMethod t readonly_prop +end (* interface SVGLinearGradientElement *) -and linearGradientElement = - object - inherit gradientElement +and linearGradientElement = object + inherit gradientElement - method x1 : animatedLength t readonly_prop + method x1 : animatedLength t readonly_prop - method y1 : animatedLength t readonly_prop + method y1 : animatedLength t readonly_prop - method x2 : animatedLength t readonly_prop + method x2 : animatedLength t readonly_prop - method y2 : animatedLength t readonly_prop - end + method y2 : animatedLength t readonly_prop +end (* interface SVGRadialGradientElement *) -and radialGradientElement = - object - inherit gradientElement +and radialGradientElement = object + inherit gradientElement - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method r : animatedLength t readonly_prop + method r : animatedLength t readonly_prop - method fx : animatedLength t readonly_prop + method fx : animatedLength t readonly_prop - method fy : animatedLength t readonly_prop - end + method fy : animatedLength t readonly_prop +end (* interface SVGStopElement *) -and stopElement = - object - inherit element +and stopElement = object + inherit element - inherit stylable + inherit stylable - method offset : animatedNumber t readonly_prop - end + method offset : animatedNumber t readonly_prop +end (* interface SVGPatternElement *) -and patternElement = - object - inherit element +and patternElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit fitToViewBox + inherit fitToViewBox - (* readonly attribute SVGAnimatedEnumeration patternUnits; *) - (* readonly attribute SVGAnimatedEnumeration patternContentUnits; *) - method patternTransform : animatedTransformList t readonly_prop + (* readonly attribute SVGAnimatedEnumeration patternUnits; *) + (* readonly attribute SVGAnimatedEnumeration patternContentUnits; *) + method patternTransform : animatedTransformList t readonly_prop - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end (* interface SVGClipPathElement *) -and clipPathElement = - object - inherit element +and clipPathElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - (* readonly attribute SVGAnimatedEnumeration clipPathUnits; *) - end + inherit transformable + (* readonly attribute SVGAnimatedEnumeration clipPathUnits; *) +end (* interface SVGMaskElement *) -and maskElement = - object - inherit element +and maskElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration maskUnits; *) - (* readonly attribute SVGAnimatedEnumeration maskContentUnits; *) - method x : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedEnumeration maskUnits; *) + (* readonly attribute SVGAnimatedEnumeration maskContentUnits; *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end (* interface SVGFilterElement *) -and filterElement = - object - inherit element +and filterElement = object + inherit element - inherit uriReference + inherit uriReference - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration filterUnits; *) - (* readonly attribute SVGAnimatedEnumeration primitiveUnits; *) - method x : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedEnumeration filterUnits; *) + (* readonly attribute SVGAnimatedEnumeration primitiveUnits; *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method filterResX : animatedInteger t readonly_prop + method filterResX : animatedInteger t readonly_prop - method filterResY : animatedInteger t readonly_prop + method filterResY : animatedInteger t readonly_prop - method setFilterRes : int -> int -> unit meth - end + method setFilterRes : int -> int -> unit meth +end (* interface SVGFilterPrimitiveStandardAttributes : SVGStylable { *) (* readonly attribute SVGAnimatedLength x; *) @@ -1786,66 +1715,62 @@ and filterElement = (* }; *) (* interface SVGCursorElement *) -and cursorElement = - object - inherit element +and cursorElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit externalResourcesRequired + inherit externalResourcesRequired - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop - end + method y : animatedLength t readonly_prop +end (* interface SVGAElement *) -and aElement = - object - inherit element +and aElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method target : animatedString t readonly_prop - end + method target : animatedString t readonly_prop +end (* interface SVGViewElement *) -and viewElement = - object - inherit element +and viewElement = object + inherit element - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit fitToViewBox + inherit fitToViewBox - inherit zoomAndPan + inherit zoomAndPan - method viewTarget : stringList t readonly_prop - end + method viewTarget : stringList t readonly_prop +end (* interface SVGScriptElement *) -and scriptElement = - object - inherit element +and scriptElement = object + inherit element - inherit uriReference + inherit uriReference - inherit externalResourcesRequired + inherit externalResourcesRequired - method type_ : js_string t prop - end + method type_ : js_string t prop +end (* interface SVGZoomEvent : UIEvent *) (* readonly attribute SVGRect zoomRectScreen; *) @@ -1856,31 +1781,29 @@ and scriptElement = (* }; *) (* interface SVGAnimationElement *) -and animationElement = - object - inherit element +and animationElement = object + inherit element - inherit tests + inherit tests - inherit externalResourcesRequired + inherit externalResourcesRequired - (* inherit elementTimeControl *) - method targetElement : element t readonly_prop + (* inherit elementTimeControl *) + method targetElement : element t readonly_prop - method getStartTime : float meth + method getStartTime : float meth - method getCurrentTime : float meth + method getCurrentTime : float meth - method getSimpleDuration : float meth - end + method getSimpleDuration : float meth +end (* interface SVGAnimateElement *) -and animateElement = - object - inherit animationElement +and animateElement = object + inherit animationElement - inherit stylable - end + inherit stylable +end (* interface SVGSetElement *) and setElement = animationElement @@ -1889,42 +1812,38 @@ and setElement = animationElement and animateMotionElement = animationElement (* interface SVGMPathElement *) -and mPathElement = - object - inherit element +and mPathElement = object + inherit element - inherit uriReference + inherit uriReference - inherit externalResourcesRequired - end + inherit externalResourcesRequired +end (* interface SVGAnimateColorElement *) -and animateColorElement = - object - inherit animationElement +and animateColorElement = object + inherit animationElement - inherit stylable - end + inherit stylable +end (* interface SVGAnimateTransformElement *) and animateTransformElement = animationElement (* interface SVGFontElement *) -and fontElement = - object - inherit element +and fontElement = object + inherit element - inherit stylable - end + inherit stylable +end (* interface SVGGlyphElement *) (* interface SVGMissingGlyphElement*) -and glyphElement = - object - inherit element +and glyphElement = object + inherit element - inherit stylable - end + inherit stylable +end (* interface SVGHKernElement : SVGElement *) (* interface SVGVKernElement : SVGElement *) @@ -1948,28 +1867,27 @@ class type fontFaceNameElement = element class type metadataElement = element (* interface SVGForeignObjectElement *) -class type foreignObjectElement = - object - inherit element +class type foreignObjectElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end let createElement (doc : document t) name = doc##createElementNS xmlns (Js.string name) diff --git a/lib/js_of_ocaml/dom_svg.mli b/lib/js_of_ocaml/dom_svg.mli index 3a0772d448..1f99ba4f8e 100644 --- a/lib/js_of_ocaml/dom_svg.mli +++ b/lib/js_of_ocaml/dom_svg.mli @@ -33,12 +33,11 @@ type error_code = | INVALID_VALUE_ERR | MATRIX_NOT_INVERTABLE -class type svg_error = - object - inherit Js.error +class type svg_error = object + inherit Js.error - method code : error_code t readonly_prop - end + method code : error_code t readonly_prop +end exception SVGError of svg_error @@ -165,48 +164,45 @@ type suspendHandleID (****) -class type ['a] animated = - object - method baseVal : 'a prop +class type ['a] animated = object + method baseVal : 'a prop - method animVal : 'a prop - end + method animVal : 'a prop +end -class type ['a] list = - object - method numberOfItems : int readonly_prop +class type ['a] list = object + method numberOfItems : int readonly_prop - method clear : unit meth + method clear : unit meth - method initialize : 'a -> 'a meth + method initialize : 'a -> 'a meth - method getItem : int -> 'a meth + method getItem : int -> 'a meth - method insertItemBefore : 'a -> int -> 'a meth + method insertItemBefore : 'a -> int -> 'a meth - method replaceItem : 'a -> int -> 'a meth + method replaceItem : 'a -> int -> 'a meth - method removeItem : int -> 'a meth + method removeItem : int -> 'a meth - method appendItem : 'a -> 'a meth - end + method appendItem : 'a -> 'a meth +end (****) (** {2 Elements } *) (* interface SVGElement *) -class type element = - object - inherit Dom.element +class type element = object + inherit Dom.element - method id : js_string t prop + method id : js_string t prop - method xmlbase : js_string t prop + method xmlbase : js_string t prop - method ownerSVGElement : svgElement t readonly_prop + method ownerSVGElement : svgElement t readonly_prop - method viewportElement : element t readonly_prop - end + method viewportElement : element t readonly_prop +end (* interface SVGAnimatedString *) and animatedString = [js_string t] animated @@ -233,20 +229,19 @@ and numberList = [number t] list and animatedNumberList = [numberList t] animated (* interface SVGLength *) -and length = - object - method unitType : lengthUnitType readonly_prop +and length = object + method unitType : lengthUnitType readonly_prop - method value : float prop + method value : float prop - method valueInSpecifiedUnits : float prop + method valueInSpecifiedUnits : float prop - method valueAsString : js_string t prop + method valueAsString : js_string t prop - method newValueSpecifiedUnits : lengthUnitType -> float -> unit meth + method newValueSpecifiedUnits : lengthUnitType -> float -> unit meth - method convertToSpecifiedUnits : lengthUnitType -> unit meth - end + method convertToSpecifiedUnits : lengthUnitType -> unit meth +end (* interface SVGAnimatedLength *) and animatedLength = [length t] animated @@ -258,20 +253,19 @@ and lengthList = [length t] list and animatedLengthList = [lengthList t] animated (* interface SVGAngle *) -and angle = - object - method unitType : angleUnitType readonly_prop +and angle = object + method unitType : angleUnitType readonly_prop - method value : float prop + method value : float prop - method valueInSpecifiedUnits : float prop + method valueInSpecifiedUnits : float prop - method valueAsString : js_string t prop + method valueAsString : js_string t prop - method newValueSpecifiedUnits : angleUnitType -> float -> unit meth + method newValueSpecifiedUnits : angleUnitType -> float -> unit meth - method convertToSpecifiedUnits : angleUnitType -> unit meth - end + method convertToSpecifiedUnits : angleUnitType -> unit meth +end (* interface SVGAnimatedAngle *) and animatedAngle = [angle t] animated @@ -280,1008 +274,952 @@ and animatedAngle = [angle t] animated and rgbColor = object end (* interface SVGColor *) -and color = - object - (* XXX inherit cssValue *) - method colorType : colorType readonly_prop +and color = object + (* XXX inherit cssValue *) + method colorType : colorType readonly_prop - method rgbColor : rgbColor t readonly_prop + method rgbColor : rgbColor t readonly_prop - method iccColor : iccColor t readonly_prop + method iccColor : iccColor t readonly_prop - method setRGBColor : js_string t -> unit meth + method setRGBColor : js_string t -> unit meth - method setRGBColorICCColor : js_string t -> js_string t -> unit meth + method setRGBColorICCColor : js_string t -> js_string t -> unit meth - method setColor : colorType -> js_string t -> js_string t -> unit meth - end + method setColor : colorType -> js_string t -> js_string t -> unit meth +end (* interface SVGICCColor *) -and iccColor = - object - method colorProfile : js_string t prop +and iccColor = object + method colorProfile : js_string t prop - method colors : numberList t readonly_prop - end + method colors : numberList t readonly_prop +end (* interface SVGRect *) -and rect = - object - method x : float prop +and rect = object + method x : float prop - method y : float prop + method y : float prop - method width : float prop + method width : float prop - method height : float prop - end + method height : float prop +end (* interface SVGAnimatedRect *) and animatedRect = [rect t] animated (* interface SVGStylable *) -and stylable = - object - method className : animatedString t readonly_prop +and stylable = object + method className : animatedString t readonly_prop - method style : Dom_html.cssStyleDeclaration t readonly_prop - (* CSSValue getPresentationAttribute(in DOMString name); *) - end + method style : Dom_html.cssStyleDeclaration t readonly_prop + (* CSSValue getPresentationAttribute(in DOMString name); *) +end (* interface SVGLocatable *) -and locatable = - object - method nearestViewportElement : element t readonly_prop +and locatable = object + method nearestViewportElement : element t readonly_prop - method farthestViewportElement : element t readonly_prop + method farthestViewportElement : element t readonly_prop - method getBBox : rect t meth + method getBBox : rect t meth - method getCTM : matrix t meth + method getCTM : matrix t meth - method getScreenCTM : matrix t meth + method getScreenCTM : matrix t meth - method getTransformToElement : element t -> matrix t meth - end + method getTransformToElement : element t -> matrix t meth +end (* interface SVGTransformable *) -and transformable = - object - inherit locatable +and transformable = object + inherit locatable - method transform : animatedTransformList t readonly_prop - end + method transform : animatedTransformList t readonly_prop +end (* interface SVGTests *) -and tests = - object - method requiredFeatures : stringList t readonly_prop +and tests = object + method requiredFeatures : stringList t readonly_prop - method requiredExtensions : stringList t readonly_prop + method requiredExtensions : stringList t readonly_prop - method systemLanguage : stringList t readonly_prop + method systemLanguage : stringList t readonly_prop - method hasExtension : js_string t -> bool t meth - end + method hasExtension : js_string t -> bool t meth +end (* interface SVGLangSpace *) -and langSpace = - object - method xmllang : js_string t prop +and langSpace = object + method xmllang : js_string t prop - method xmlspace : js_string t prop - end + method xmlspace : js_string t prop +end (* interface SVGExternalResourcesRequired *) -and externalResourcesRequired = - object - method externalResourcesRequired : animatedBoolean t readonly_prop - end +and externalResourcesRequired = object + method externalResourcesRequired : animatedBoolean t readonly_prop +end (* interface SVGFitToViewBox *) -and fitToViewBox = - object - method viewBox : animatedRect t readonly_prop +and fitToViewBox = object + method viewBox : animatedRect t readonly_prop - method preserveAspectRatio : animatedPreserveAspectRatio t readonly_prop - end + method preserveAspectRatio : animatedPreserveAspectRatio t readonly_prop +end (* interface SVGZoomAndPan *) -and zoomAndPan = - object - method zoomAndPan : zoomAndPanType prop - end +and zoomAndPan = object + method zoomAndPan : zoomAndPanType prop +end (* interface SVGViewSpec *) -and viewSpec = - object - inherit zoomAndPan +and viewSpec = object + inherit zoomAndPan - inherit fitToViewBox + inherit fitToViewBox - method transform : transformList t readonly_prop + method transform : transformList t readonly_prop - method viewTarget : element t readonly_prop + method viewTarget : element t readonly_prop - method viewBoxString : js_string t readonly_prop + method viewBoxString : js_string t readonly_prop - method preserveAspectRatioString : js_string t readonly_prop + method preserveAspectRatioString : js_string t readonly_prop - method transformString : js_string t readonly_prop + method transformString : js_string t readonly_prop - method viewTargetString : js_string t readonly_prop - end + method viewTargetString : js_string t readonly_prop +end (* interface SVGURIReference *) -and uriReference = - object - method href : animatedString t readonly_prop - end +and uriReference = object + method href : animatedString t readonly_prop +end (* interface SVGCSSRule : CSSRule *) (* const unsigned short COLOR_PROFILE_RULE = 7; *) (* }; *) (* interface SVGDocument *) -and document = - object - inherit [element] Dom.document +and document = object + inherit [element] Dom.document - (*XXX inherit documentEvent *) - method title : js_string t prop + (*XXX inherit documentEvent *) + method title : js_string t prop - method referrer : js_string t readonly_prop + method referrer : js_string t readonly_prop - method domain : js_string t prop + method domain : js_string t prop - method _URL : js_string t readonly_prop + method _URL : js_string t readonly_prop - method rootElement : svgElement t opt readonly_prop - end + method rootElement : svgElement t opt readonly_prop +end (* interface SVGSVGElement *) -and svgElement = - object - inherit element +and svgElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit locatable + inherit locatable - inherit fitToViewBox + inherit fitToViewBox - inherit zoomAndPan + inherit zoomAndPan - (*XXX inherit documentevent, viewcss, documentcss *) - method x : animatedLength t readonly_prop + (*XXX inherit documentevent, viewcss, documentcss *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method contentScriptType : js_string t prop + method contentScriptType : js_string t prop - method contentStyleType : js_string t prop + method contentStyleType : js_string t prop - method viewport : rect t readonly_prop + method viewport : rect t readonly_prop - method pixelUnitToMillimeterX : float readonly_prop + method pixelUnitToMillimeterX : float readonly_prop - method pixelUnitToMillimeterY : float readonly_prop + method pixelUnitToMillimeterY : float readonly_prop - method screenPixelUnitToMillimeterX : float readonly_prop + method screenPixelUnitToMillimeterX : float readonly_prop - method screenPixelUnitToMillimeterY : float readonly_prop + method screenPixelUnitToMillimeterY : float readonly_prop - method useCurrentView : bool t readonly_prop + method useCurrentView : bool t readonly_prop - method currentView : viewSpec t readonly_prop + method currentView : viewSpec t readonly_prop - method currentScale : float prop + method currentScale : float prop - method currentTranslate : point t readonly_prop + method currentTranslate : point t readonly_prop - method suspendRedraw : int -> suspendHandleID meth + method suspendRedraw : int -> suspendHandleID meth - method unsuspendRedraw : suspendHandleID -> unit meth + method unsuspendRedraw : suspendHandleID -> unit meth - method unsuspendRedrawAll : unit meth + method unsuspendRedrawAll : unit meth - method forceRedraw : unit meth + method forceRedraw : unit meth - method pauseAnimations : unit meth + method pauseAnimations : unit meth - method unpauseAnimations : unit meth + method unpauseAnimations : unit meth - method animationsPaused : bool t meth + method animationsPaused : bool t meth - method getCurrentTime : float meth + method getCurrentTime : float meth - method setCurrentTime : int -> unit meth + method setCurrentTime : int -> unit meth - method getIntersectionList : rect t -> element t -> element Dom.nodeList t meth + method getIntersectionList : rect t -> element t -> element Dom.nodeList t meth - method getEnclosureList : rect t -> element t -> element Dom.nodeList t meth + method getEnclosureList : rect t -> element t -> element Dom.nodeList t meth - method checkIntersection : element t -> rect t -> bool t + method checkIntersection : element t -> rect t -> bool t - method checkEnclosure : element t -> rect t -> bool t + method checkEnclosure : element t -> rect t -> bool t - method deselectAll : unit meth + method deselectAll : unit meth - method createSVGNumber : number t meth + method createSVGNumber : number t meth - method createSVGLength : length t meth + method createSVGLength : length t meth - method createSVGAngle : angle t meth + method createSVGAngle : angle t meth - method createSVGPoint : point t meth + method createSVGPoint : point t meth - method createSVGMatrix : matrix t meth + method createSVGMatrix : matrix t meth - method createSVGRect : rect t meth + method createSVGRect : rect t meth - method createSVGTransform : transform t meth + method createSVGTransform : transform t meth - method createSVGTransformFromMatrix : matrix t -> transform t meth + method createSVGTransformFromMatrix : matrix t -> transform t meth - method getElementById : js_string t -> Dom.element t meth - end + method getElementById : js_string t -> Dom.element t meth +end (* interface SVGGElement *) -and gElement = - object - inherit element +and gElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit Dom_html.eventTarget - end + inherit Dom_html.eventTarget +end (* interface SVGDefsElement *) -and defsElement = - object - inherit element +and defsElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - (* XXXXXXX ? inherit Dom_html.eventTarget *) - end + inherit transformable + (* XXXXXXX ? inherit Dom_html.eventTarget *) +end (* interface SVGDescElement *) -and descElement = - object - inherit element +and descElement = object + inherit element - inherit langSpace + inherit langSpace - inherit stylable - (* XXXXXXX ? inherit Dom_html.eventTarget *) - end + inherit stylable + (* XXXXXXX ? inherit Dom_html.eventTarget *) +end (* interface SVGTitleElement *) -and titleElement = - object - inherit element +and titleElement = object + inherit element - inherit langSpace + inherit langSpace - inherit stylable - end + inherit stylable +end (* interface SVGSymbolElement *) -and symbolElement = - object - inherit element +and symbolElement = object + inherit element - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit fitToViewBox + inherit fitToViewBox - inherit Dom_html.eventTarget - end + inherit Dom_html.eventTarget +end (* interface SVGUseElement *) -and useElement = - object - inherit element +and useElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method instanceRoot : elementInstance t readonly_prop + method instanceRoot : elementInstance t readonly_prop - method animatedInstanceRoot : elementInstance t readonly_prop - end + method animatedInstanceRoot : elementInstance t readonly_prop +end -and elementInstance = - object - inherit Dom_html.eventTarget +and elementInstance = object + inherit Dom_html.eventTarget - method correspondingElement : element t readonly_prop + method correspondingElement : element t readonly_prop - method correspondingUseElement : useElement t readonly_prop + method correspondingUseElement : useElement t readonly_prop - method parentNode : elementInstance t readonly_prop + method parentNode : elementInstance t readonly_prop - method childNodes : elementInstanceList t readonly_prop + method childNodes : elementInstanceList t readonly_prop - method firstChild : elementInstance t readonly_prop + method firstChild : elementInstance t readonly_prop - method lastChild : elementInstance t readonly_prop + method lastChild : elementInstance t readonly_prop - method previousSibling : elementInstance t readonly_prop + method previousSibling : elementInstance t readonly_prop - method nextSibling : elementInstance t readonly_prop - end + method nextSibling : elementInstance t readonly_prop +end (* interface SVGElementInstanceList *) -and elementInstanceList = - object - method length : int readonly_prop +and elementInstanceList = object + method length : int readonly_prop - method item : int -> elementInstance t - end + method item : int -> elementInstance t +end (* interface SVGImageElement *) -and imageElement = - object - inherit element +and imageElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - (* readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio *) - end + method height : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio *) +end -and switchElement = - object - inherit element +and switchElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - end + inherit transformable +end (* XXX deprecated => interface GetSVGDocument => SVGDocument getSVGDocument() *) (* interface SVGStyleElement *) -and styleElement = - object - inherit element +and styleElement = object + inherit element - inherit langSpace + inherit langSpace - method type_ : js_string t prop + method type_ : js_string t prop - method media : js_string t prop + method media : js_string t prop - method title : js_string t prop - end + method title : js_string t prop +end (* interface SVGPoint *) -and point = - object - method x : float readonly_prop +and point = object + method x : float readonly_prop - method y : float readonly_prop + method y : float readonly_prop - method matrixTransform : matrix t -> point t meth - end + method matrixTransform : matrix t -> point t meth +end (* interface SVGPointList *) and pointList = [point t] list (* interface SVGMatrix *) -and matrix = - object - method a : float readonly_prop +and matrix = object + method a : float readonly_prop - method b : float readonly_prop + method b : float readonly_prop - method c : float readonly_prop + method c : float readonly_prop - method d : float readonly_prop + method d : float readonly_prop - method e : float readonly_prop + method e : float readonly_prop - method f : float readonly_prop + method f : float readonly_prop - method multiply : matrix t -> matrix t meth + method multiply : matrix t -> matrix t meth - method inverse : matrix t meth + method inverse : matrix t meth - method translate : float -> float -> matrix t meth + method translate : float -> float -> matrix t meth - method scale : float -> matrix t meth + method scale : float -> matrix t meth - method scaleNonUniform : float -> float -> matrix t meth + method scaleNonUniform : float -> float -> matrix t meth - method rotate : float -> matrix t meth + method rotate : float -> matrix t meth - method rotateFromVector : float -> float -> matrix t meth + method rotateFromVector : float -> float -> matrix t meth - method flipX : matrix t meth + method flipX : matrix t meth - method flipY : matrix t meth + method flipY : matrix t meth - method skewX : float -> matrix t meth + method skewX : float -> matrix t meth - method skewY : float -> matrix t meth - end + method skewY : float -> matrix t meth +end (* interface SVGTransform *) -and transform = - object - method _type : transformType readonly_prop +and transform = object + method _type : transformType readonly_prop - method matrix : matrix t readonly_prop + method matrix : matrix t readonly_prop - method angle : float readonly_prop + method angle : float readonly_prop - method setMatrix : matrix t -> unit meth + method setMatrix : matrix t -> unit meth - method setTranslate : float -> float -> unit meth + method setTranslate : float -> float -> unit meth - method setScale : float -> float -> unit meth + method setScale : float -> float -> unit meth - method setRotate : float -> float -> float -> unit meth + method setRotate : float -> float -> float -> unit meth - method setSkewX : float -> unit meth + method setSkewX : float -> unit meth - method setSkewY : float -> unit meth - end + method setSkewY : float -> unit meth +end (* interface SVGTransformList *) -and transformList = - object - inherit [transform t] list +and transformList = object + inherit [transform t] list - method createSVGTransformFromMatrix : matrix -> transform t meth + method createSVGTransformFromMatrix : matrix -> transform t meth - method consolidate : transform t meth - end + method consolidate : transform t meth +end (* interface SVGAnimatedTransformList *) and animatedTransformList = [transformList t] animated (* interface SVGPreserveAspectRatio *) -and preserveAspectRatio = - object - method align : alignmentType readonly_prop +and preserveAspectRatio = object + method align : alignmentType readonly_prop - method meetOrSlice : meetOrSliceType readonly_prop - end + method meetOrSlice : meetOrSliceType readonly_prop +end (* interface SVGAnimatedPreserveAspectRatio *) and animatedPreserveAspectRatio = [preserveAspectRatio t] animated (* interface SVGPathSeg *) -and pathSeg = - object - method pathSegType : pathSegmentType readonly_prop +and pathSeg = object + method pathSegType : pathSegmentType readonly_prop - method pathSegTypeAsLetter : js_string t readonly_prop - end + method pathSegTypeAsLetter : js_string t readonly_prop +end (* interface SVGPathSegClosePath *) and pathSegClosePath = pathSeg (* interface SVGPathSegMovetoAbs *) (* interface SVGPathSegMovetoRel *) -and pathSegMoveto = - object - inherit pathSeg +and pathSegMoveto = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop - end + method y : float prop +end (* interface SVGPathSegLinetoAbs *) (* interface SVGPathSegLinetoRel *) -and pathSegLineto = - object - inherit pathSeg +and pathSegLineto = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop - end + method y : float prop +end (* interface SVGPathSegCurvetoCubicAbs *) (* interface SVGPathSegCurvetoCubicRel *) -and pathSegCurvetoCubic = - object - inherit pathSeg +and pathSegCurvetoCubic = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method x1 : float prop + method x1 : float prop - method y1 : float prop + method y1 : float prop - method x2 : float prop + method x2 : float prop - method y2 : float prop - end + method y2 : float prop +end (* interface SVGPathSegCurvetoQuadraticAbs *) (* interface SVGPathSegCurvetoQuadraticRel *) -and pathSegCurvetoQuadratic = - object - inherit pathSeg +and pathSegCurvetoQuadratic = object + inherit pathSeg - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method x1 : float prop + method x1 : float prop - method y1 : float prop - end + method y1 : float prop +end (* interface SVGPathSegArcAbs *) (* interface SVGPathSegArcRel*) -and pathSegArc = - object - inherit pathSeg +and pathSegArc = object + inherit pathSeg - method y : float prop + method y : float prop - method r1 : float prop + method r1 : float prop - method r2 : float prop + method r2 : float prop - method angle : float prop + method angle : float prop - method largeArcFlag : bool t prop + method largeArcFlag : bool t prop - method sweepFlag : bool t prop - end + method sweepFlag : bool t prop +end (* interface SVGPathSegLinetoHorizontalAbs *) (* interface SVGPathSegLinetoHorizontalRel *) -and pathSegLinetoHorizontal = - object - inherit pathSeg +and pathSegLinetoHorizontal = object + inherit pathSeg - method x : float - end + method x : float +end (* interface SVGPathSegLinetoVerticalAbs *) (* interface SVGPathSegLinetoVerticalRel *) -and pathSegLinetoVertical = - object - inherit pathSeg +and pathSegLinetoVertical = object + inherit pathSeg - method y : float - end + method y : float +end -and pathSegCurvetoCubicSmooth = - object - inherit pathSeg +and pathSegCurvetoCubicSmooth = object + inherit pathSeg - method x : float + method x : float - method y : float + method y : float - method x2 : float + method x2 : float - method y2 : float - end + method y2 : float +end (* interface SVGPathSegCurvetoQuadraticSmoothAbs *) (* interface SVGPathSegCurvetoQuadraticSmoothRel *) -and pathSegCurvetoQuadraticSmooth = - object - inherit pathSeg +and pathSegCurvetoQuadraticSmooth = object + inherit pathSeg - method x : float + method x : float - method y : float - end + method y : float +end and pathSegList = [pathSeg t] list (* interface SVGAnimatedPathData *) -and animatedPathData = - object - method pathSegList : pathSegList t prop +and animatedPathData = object + method pathSegList : pathSegList t prop - method normalizedPathSegList : pathSegList t prop + method normalizedPathSegList : pathSegList t prop - method animatedPathSegList : pathSegList t prop + method animatedPathSegList : pathSegList t prop - method animatedNormalizedPathSegList : pathSegList t prop - end + method animatedNormalizedPathSegList : pathSegList t prop +end (* interface SVGPathElement *) -and pathElement = - object - inherit element +and pathElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPathData + inherit animatedPathData - method pathLength : animatedNumber t readonly_prop + method pathLength : animatedNumber t readonly_prop - method getTotalLength : float meth + method getTotalLength : float meth - method getPointAtLength : float -> point t meth + method getPointAtLength : float -> point t meth - method getPathSegAtLength : float -> int + method getPathSegAtLength : float -> int - method createSVGPathSegClosePath : pathSegClosePath meth + method createSVGPathSegClosePath : pathSegClosePath meth - method createSVGPathSegMovetoAbs : float -> float -> pathSegMoveto meth + method createSVGPathSegMovetoAbs : float -> float -> pathSegMoveto meth - method createSVGPathSegMovetoRel : float -> float -> pathSegMoveto meth + method createSVGPathSegMovetoRel : float -> float -> pathSegMoveto meth - method createSVGPathSegLinetoAbs : float -> float -> pathSegLineto meth + method createSVGPathSegLinetoAbs : float -> float -> pathSegLineto meth - method createSVGPathSegLinetoRel : float -> float -> pathSegLineto meth + method createSVGPathSegLinetoRel : float -> float -> pathSegLineto meth - method createSVGPathSegCurvetoCubicAbs : - float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth + method createSVGPathSegCurvetoCubicAbs : + float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth - method createSVGPathSegCurvetoCubicRel : - float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth + method createSVGPathSegCurvetoCubicRel : + float -> float -> float -> float -> float -> float -> pathSegCurvetoCubic meth - method createSVGPathSegCurvetoQuadraticAbs : - float -> float -> float -> float -> pathSegCurvetoQuadratic meth + method createSVGPathSegCurvetoQuadraticAbs : + float -> float -> float -> float -> pathSegCurvetoQuadratic meth - method createSVGPathSegCurvetoQuadraticRel : - float -> float -> float -> float -> pathSegCurvetoQuadratic meth + method createSVGPathSegCurvetoQuadraticRel : + float -> float -> float -> float -> pathSegCurvetoQuadratic meth - method createSVGPathSegArcAbs : - float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth + method createSVGPathSegArcAbs : + float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth - method createSVGPathSegArcRel : - float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth + method createSVGPathSegArcRel : + float -> float -> float -> float -> float -> bool t -> bool t -> pathSegArc meth - method createSVGPathSegLinetoHorizontalAbs : float -> pathSegLinetoHorizontal meth + method createSVGPathSegLinetoHorizontalAbs : float -> pathSegLinetoHorizontal meth - method createSVGPathSegLinetoHorizontalRel : float -> pathSegLinetoHorizontal meth + method createSVGPathSegLinetoHorizontalRel : float -> pathSegLinetoHorizontal meth - method createSVGPathSegLinetoVerticalAbs : float -> pathSegLinetoVertical meth + method createSVGPathSegLinetoVerticalAbs : float -> pathSegLinetoVertical meth - method createSVGPathSegLinetoVerticalRel : float -> pathSegLinetoVertical meth + method createSVGPathSegLinetoVerticalRel : float -> pathSegLinetoVertical meth - method createSVGPathSegCurvetoCubicSmoothAbs : - float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth + method createSVGPathSegCurvetoCubicSmoothAbs : + float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth - method createSVGPathSegCurvetoCubicSmoothRel : - float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth + method createSVGPathSegCurvetoCubicSmoothRel : + float -> float -> float -> float -> pathSegCurvetoCubicSmooth meth - method createSVGPathSegCurvetoQuadraticSmoothAbs : - float -> float -> pathSegCurvetoQuadraticSmooth meth + method createSVGPathSegCurvetoQuadraticSmoothAbs : + float -> float -> pathSegCurvetoQuadraticSmooth meth - method createSVGPathSegCurvetoQuadraticSmoothRel : - float -> float -> pathSegCurvetoQuadraticSmooth meth - end + method createSVGPathSegCurvetoQuadraticSmoothRel : + float -> float -> pathSegCurvetoQuadraticSmooth meth +end (* interface SVGRectElement *) -and rectElement = - object - inherit element +and rectElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method rx : animatedLength t readonly_prop + method rx : animatedLength t readonly_prop - method ry : animatedLength t readonly_prop - end + method ry : animatedLength t readonly_prop +end (* interface SVGCircleElement *) -and circleElement = - object - inherit element +and circleElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method r : animatedLength t readonly_prop - end + method r : animatedLength t readonly_prop +end (* interface SVGEllipseElement *) -and ellipseElement = - object - inherit element +and ellipseElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method rx : animatedLength t readonly_prop + method rx : animatedLength t readonly_prop - method ry : animatedLength t readonly_prop - end + method ry : animatedLength t readonly_prop +end (* interface SVGLineElement *) -class type lineElement = - object - inherit element +class type lineElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit Dom_html.eventTarget + inherit Dom_html.eventTarget - method x1 : animatedLength t readonly_prop + method x1 : animatedLength t readonly_prop - method y1 : animatedLength t readonly_prop + method y1 : animatedLength t readonly_prop - method x2 : animatedLength t readonly_prop + method x2 : animatedLength t readonly_prop - method y2 : animatedLength t readonly_prop - end + method y2 : animatedLength t readonly_prop +end (* interface SVGAnimatedPoints *) -and animatedPoints = - object - method points : pointList t readonly_prop +and animatedPoints = object + method points : pointList t readonly_prop - method animatedpoints : pointList t readonly_prop - end + method animatedpoints : pointList t readonly_prop +end (* interface SVGPolylineElement *) -and polyLineElement = - object - inherit element +and polyLineElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPoints - end + inherit animatedPoints +end (* interface SVGPolygonElement *) -and polygonElement = - object - inherit element +and polygonElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - inherit animatedPoints - end + inherit animatedPoints +end (* interface SVGTextContentElement *) -and textContentElement = - object - inherit element +and textContentElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit Dom_html.eventTarget + inherit Dom_html.eventTarget - method textLength : animatedLength t readonly_prop + method textLength : animatedLength t readonly_prop - method lengthAdjust : lengthAdjust animated t readonly_prop + method lengthAdjust : lengthAdjust animated t readonly_prop - method getNumberOfChars : int meth + method getNumberOfChars : int meth - method getComputedTextLength : float meth + method getComputedTextLength : float meth - method getSubStringLength : int -> int -> float meth + method getSubStringLength : int -> int -> float meth - method getStartPositionOfChar : int -> point t meth + method getStartPositionOfChar : int -> point t meth - method getEndPositionOfChar : int -> point t meth + method getEndPositionOfChar : int -> point t meth - method getExtentOfChar : int -> rect t meth + method getExtentOfChar : int -> rect t meth - method getRotationOfChar : int -> float meth + method getRotationOfChar : int -> float meth - method getCharNumAtPosition : point -> int meth + method getCharNumAtPosition : point -> int meth - method selectSubString : int -> int -> unit meth - end + method selectSubString : int -> int -> unit meth +end (* interface SVGTextPositioningElement *) -and textPositioningElement = - object - inherit textContentElement +and textPositioningElement = object + inherit textContentElement - method x : animatedLengthList t readonly_prop + method x : animatedLengthList t readonly_prop - method y : animatedLengthList t readonly_prop + method y : animatedLengthList t readonly_prop - method dx : animatedLengthList t readonly_prop + method dx : animatedLengthList t readonly_prop - method dy : animatedLengthList t readonly_prop + method dy : animatedLengthList t readonly_prop - method rotate : animatedNumberList t readonly_prop - end + method rotate : animatedNumberList t readonly_prop +end (* interface SVGTextElement *) -and textElement = - object - inherit textPositioningElement +and textElement = object + inherit textPositioningElement - inherit transformable - end + inherit transformable +end and tspanElement = textPositioningElement -and trefElement = - object - inherit textPositioningElement +and trefElement = object + inherit textPositioningElement - inherit uriReference - end + inherit uriReference +end (* interface SVGTextPathElement *) and textPathElementMethod = [textPathMethodType] animated and textPathElementSpacing = [textPathSpacingType] animated -and textPathElement = - object - inherit textContentElement +and textPathElement = object + inherit textContentElement - inherit uriReference + inherit uriReference - method startOffset : animatedLength t readonly_prop + method startOffset : animatedLength t readonly_prop - method method_ : textPathElementMethod readonly_prop + method method_ : textPathElementMethod readonly_prop - method spacing : textPathElementSpacing readonly_prop - end + method spacing : textPathElementSpacing readonly_prop +end (* interface SVGAltGlyphElement *) -and altGlyphElement = - object - inherit textPositioningElement +and altGlyphElement = object + inherit textPositioningElement - inherit uriReference + inherit uriReference - method glyphRef : js_string t prop + method glyphRef : js_string t prop - method format : js_string t prop - end + method format : js_string t prop +end (* interface SVGAltGlyphDefElement *) and altGlyphDefElement = element @@ -1290,26 +1228,25 @@ and altGlyphDefElement = element and altGlyphItemElement = element (* interface SVGGlyphRefElement *) -and glyphRefElement = - object - inherit element +and glyphRefElement = object + inherit element - inherit uriReference + inherit uriReference - inherit stylable + inherit stylable - method glyphRef : js_string t prop + method glyphRef : js_string t prop - method format : js_string t prop + method format : js_string t prop - method x : float prop + method x : float prop - method y : float prop + method y : float prop - method dx : float prop + method dx : float prop - method dy : float prop - end + method dy : float prop +end (* interface SVGPaint : SVGColor { *) @@ -1378,160 +1315,152 @@ and glyphRefElement = (* interface SVGGradientElement *) and animatedSpreadMethod = [spreadMethodType] animated -and gradientElement = - object - inherit element +and gradientElement = object + inherit element - inherit uriReference + inherit uriReference - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration gradientUnits; *) - method gradientTransform : animatedTransformList t readonly_prop + (* readonly attribute SVGAnimatedEnumeration gradientUnits; *) + method gradientTransform : animatedTransformList t readonly_prop - method spreadMethod : animatedSpreadMethod t readonly_prop - end + method spreadMethod : animatedSpreadMethod t readonly_prop +end (* interface SVGLinearGradientElement *) -and linearGradientElement = - object - inherit gradientElement +and linearGradientElement = object + inherit gradientElement - method x1 : animatedLength t readonly_prop + method x1 : animatedLength t readonly_prop - method y1 : animatedLength t readonly_prop + method y1 : animatedLength t readonly_prop - method x2 : animatedLength t readonly_prop + method x2 : animatedLength t readonly_prop - method y2 : animatedLength t readonly_prop - end + method y2 : animatedLength t readonly_prop +end (* interface SVGRadialGradientElement *) -and radialGradientElement = - object - inherit gradientElement +and radialGradientElement = object + inherit gradientElement - method cx : animatedLength t readonly_prop + method cx : animatedLength t readonly_prop - method cy : animatedLength t readonly_prop + method cy : animatedLength t readonly_prop - method r : animatedLength t readonly_prop + method r : animatedLength t readonly_prop - method fx : animatedLength t readonly_prop + method fx : animatedLength t readonly_prop - method fy : animatedLength t readonly_prop - end + method fy : animatedLength t readonly_prop +end (* interface SVGStopElement *) -and stopElement = - object - inherit element +and stopElement = object + inherit element - inherit stylable + inherit stylable - method offset : animatedNumber t readonly_prop - end + method offset : animatedNumber t readonly_prop +end (* interface SVGPatternElement *) -and patternElement = - object - inherit element +and patternElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit fitToViewBox + inherit fitToViewBox - (* readonly attribute SVGAnimatedEnumeration patternUnits; *) - (* readonly attribute SVGAnimatedEnumeration patternContentUnits; *) - method patternTransform : animatedTransformList t readonly_prop + (* readonly attribute SVGAnimatedEnumeration patternUnits; *) + (* readonly attribute SVGAnimatedEnumeration patternContentUnits; *) + method patternTransform : animatedTransformList t readonly_prop - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end (* interface SVGClipPathElement *) -and clipPathElement = - object - inherit element +and clipPathElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable - (* readonly attribute SVGAnimatedEnumeration clipPathUnits; *) - end + inherit transformable + (* readonly attribute SVGAnimatedEnumeration clipPathUnits; *) +end (* interface SVGMaskElement *) -and maskElement = - object - inherit element +and maskElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration maskUnits; *) - (* readonly attribute SVGAnimatedEnumeration maskContentUnits; *) - method x : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedEnumeration maskUnits; *) + (* readonly attribute SVGAnimatedEnumeration maskContentUnits; *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end (* interface SVGFilterElement *) -and filterElement = - object - inherit element +and filterElement = object + inherit element - inherit uriReference + inherit uriReference - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - (* readonly attribute SVGAnimatedEnumeration filterUnits; *) - (* readonly attribute SVGAnimatedEnumeration primitiveUnits; *) - method x : animatedLength t readonly_prop + (* readonly attribute SVGAnimatedEnumeration filterUnits; *) + (* readonly attribute SVGAnimatedEnumeration primitiveUnits; *) + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop + method height : animatedLength t readonly_prop - method filterResX : animatedInteger t readonly_prop + method filterResX : animatedInteger t readonly_prop - method filterResY : animatedInteger t readonly_prop + method filterResY : animatedInteger t readonly_prop - method setFilterRes : int -> int -> unit meth - end + method setFilterRes : int -> int -> unit meth +end (* interface SVGFilterPrimitiveStandardAttributes : SVGStylable { *) (* readonly attribute SVGAnimatedLength x; *) @@ -1788,66 +1717,62 @@ and filterElement = (* }; *) (* interface SVGCursorElement *) -and cursorElement = - object - inherit element +and cursorElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit externalResourcesRequired + inherit externalResourcesRequired - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop - end + method y : animatedLength t readonly_prop +end (* interface SVGAElement *) -and aElement = - object - inherit element +and aElement = object + inherit element - inherit uriReference + inherit uriReference - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method target : animatedString t readonly_prop - end + method target : animatedString t readonly_prop +end (* interface SVGViewElement *) -and viewElement = - object - inherit element +and viewElement = object + inherit element - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit fitToViewBox + inherit fitToViewBox - inherit zoomAndPan + inherit zoomAndPan - method viewTarget : stringList t readonly_prop - end + method viewTarget : stringList t readonly_prop +end (* interface SVGScriptElement *) -and scriptElement = - object - inherit element +and scriptElement = object + inherit element - inherit uriReference + inherit uriReference - inherit externalResourcesRequired + inherit externalResourcesRequired - method type_ : js_string t prop - end + method type_ : js_string t prop +end (* interface SVGZoomEvent : UIEvent *) (* readonly attribute SVGRect zoomRectScreen; *) @@ -1858,31 +1783,29 @@ and scriptElement = (* }; *) (* interface SVGAnimationElement *) -and animationElement = - object - inherit element +and animationElement = object + inherit element - inherit tests + inherit tests - inherit externalResourcesRequired + inherit externalResourcesRequired - (* inherit elementTimeControl *) - method targetElement : element t readonly_prop + (* inherit elementTimeControl *) + method targetElement : element t readonly_prop - method getStartTime : float meth + method getStartTime : float meth - method getCurrentTime : float meth + method getCurrentTime : float meth - method getSimpleDuration : float meth - end + method getSimpleDuration : float meth +end (* interface SVGAnimateElement *) -and animateElement = - object - inherit animationElement +and animateElement = object + inherit animationElement - inherit stylable - end + inherit stylable +end (* interface SVGSetElement *) and setElement = animationElement @@ -1891,42 +1814,38 @@ and setElement = animationElement and animateMotionElement = animationElement (* interface SVGMPathElement *) -and mPathElement = - object - inherit element +and mPathElement = object + inherit element - inherit uriReference + inherit uriReference - inherit externalResourcesRequired - end + inherit externalResourcesRequired +end (* interface SVGAnimateColorElement *) -and animateColorElement = - object - inherit animationElement +and animateColorElement = object + inherit animationElement - inherit stylable - end + inherit stylable +end (* interface SVGAnimateTransformElement *) and animateTransformElement = animationElement (* interface SVGFontElement *) -and fontElement = - object - inherit element +and fontElement = object + inherit element - inherit stylable - end + inherit stylable +end (* interface SVGGlyphElement *) (* interface SVGMissingGlyphElement*) -and glyphElement = - object - inherit element +and glyphElement = object + inherit element - inherit stylable - end + inherit stylable +end (* interface SVGHKernElement : SVGElement *) (* interface SVGVKernElement : SVGElement *) @@ -1950,28 +1869,27 @@ class type fontFaceNameElement = element class type metadataElement = element (* interface SVGForeignObjectElement *) -class type foreignObjectElement = - object - inherit element +class type foreignObjectElement = object + inherit element - inherit tests + inherit tests - inherit langSpace + inherit langSpace - inherit externalResourcesRequired + inherit externalResourcesRequired - inherit stylable + inherit stylable - inherit transformable + inherit transformable - method x : animatedLength t readonly_prop + method x : animatedLength t readonly_prop - method y : animatedLength t readonly_prop + method y : animatedLength t readonly_prop - method width : animatedLength t readonly_prop + method width : animatedLength t readonly_prop - method height : animatedLength t readonly_prop - end + method height : animatedLength t readonly_prop +end (** {2 Helper functions for creating Svg elements} *) diff --git a/lib/js_of_ocaml/eventSource.ml b/lib/js_of_ocaml/eventSource.ml index 302f4d19e6..d6f8d4fc9f 100644 --- a/lib/js_of_ocaml/eventSource.ml +++ b/lib/js_of_ocaml/eventSource.ml @@ -27,39 +27,36 @@ type state = | OPEN | CLOSED -class type ['a] messageEvent = - object - inherit ['a] Dom.event +class type ['a] messageEvent = object + inherit ['a] Dom.event - method data : js_string t readonly_prop + method data : js_string t readonly_prop - method origin : js_string t readonly_prop + method origin : js_string t readonly_prop - method lastEventId : js_string t readonly_prop - (* method source : unit *) - end + method lastEventId : js_string t readonly_prop + (* method source : unit *) +end -class type eventSource = - object ('self) - method url : string t readonly_prop +class type eventSource = object ('self) + method url : string t readonly_prop - method withCredentials : bool t readonly_prop + method withCredentials : bool t readonly_prop - method readyState : state readonly_prop + method readyState : state readonly_prop - method close : unit meth + method close : unit meth - method onopen : ('self t, 'self messageEvent t) event_listener writeonly_prop + method onopen : ('self t, 'self messageEvent t) event_listener writeonly_prop - method onmessage : ('self t, 'self messageEvent t) event_listener writeonly_prop + method onmessage : ('self t, 'self messageEvent t) event_listener writeonly_prop - method onerror : ('self t, 'self messageEvent t) event_listener writeonly_prop - end + method onerror : ('self t, 'self messageEvent t) event_listener writeonly_prop +end -class type options = - object - method withCredentials : bool t writeonly_prop - end +class type options = object + method withCredentials : bool t writeonly_prop +end let withCredentials b : options t = let init = Js.Unsafe.obj [||] in diff --git a/lib/js_of_ocaml/eventSource.mli b/lib/js_of_ocaml/eventSource.mli index cf8d51bcc2..6ffdeda4f9 100644 --- a/lib/js_of_ocaml/eventSource.mli +++ b/lib/js_of_ocaml/eventSource.mli @@ -27,39 +27,36 @@ type state = | OPEN | CLOSED -class type ['a] messageEvent = - object - inherit ['a] Dom.event +class type ['a] messageEvent = object + inherit ['a] Dom.event - method data : js_string t readonly_prop + method data : js_string t readonly_prop - method origin : js_string t readonly_prop + method origin : js_string t readonly_prop - method lastEventId : js_string t readonly_prop - (* method source : unit *) - end + method lastEventId : js_string t readonly_prop + (* method source : unit *) +end -class type eventSource = - object ('self) - method url : string t readonly_prop +class type eventSource = object ('self) + method url : string t readonly_prop - method withCredentials : bool t readonly_prop + method withCredentials : bool t readonly_prop - method readyState : state readonly_prop + method readyState : state readonly_prop - method close : unit meth + method close : unit meth - method onopen : ('self t, 'self messageEvent t) event_listener writeonly_prop + method onopen : ('self t, 'self messageEvent t) event_listener writeonly_prop - method onmessage : ('self t, 'self messageEvent t) event_listener writeonly_prop + method onmessage : ('self t, 'self messageEvent t) event_listener writeonly_prop - method onerror : ('self t, 'self messageEvent t) event_listener writeonly_prop - end + method onerror : ('self t, 'self messageEvent t) event_listener writeonly_prop +end -class type options = - object - method withCredentials : bool t writeonly_prop - end +class type options = object + method withCredentials : bool t writeonly_prop +end val withCredentials : bool -> options t diff --git a/lib/js_of_ocaml/file.ml b/lib/js_of_ocaml/file.ml index 445654726b..88f15b46f8 100644 --- a/lib/js_of_ocaml/file.ml +++ b/lib/js_of_ocaml/file.ml @@ -22,16 +22,15 @@ open Js open Dom open! Import -class type blob = - object - method size : int readonly_prop +class type blob = object + method size : int readonly_prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method slice : int -> int -> blob t meth + method slice : int -> int -> blob t meth - method slice_withContentType : int -> int -> js_string t -> blob t meth - end + method slice_withContentType : int -> int -> js_string t -> blob t meth +end let blob_constr = Unsafe.global##._Blob @@ -84,22 +83,20 @@ let blob_from_any ?contentType ?endings l = in blob_raw ?contentType ?endings (Array.of_list l) -class type file = - object - inherit blob +class type file = object + inherit blob - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method lastModifiedDate : js_string t readonly_prop - end + method lastModifiedDate : js_string t readonly_prop +end (* in firefox 3.0-3.5 file.name is not available, we use the nonstandard fileName instead *) -class type file_name_only = - object - method name : js_string t optdef readonly_prop +class type file_name_only = object + method name : js_string t optdef readonly_prop - method fileName : js_string t optdef readonly_prop - end + method fileName : js_string t optdef readonly_prop +end let filename file = let file : file_name_only t = Js.Unsafe.coerce file in @@ -136,69 +133,64 @@ module CoerceTo = struct else Js.null end -class type fileList = - object - inherit [file] Dom.nodeList - end +class type fileList = object + inherit [file] Dom.nodeList +end -class type fileError = - object - method code : int readonly_prop - end +class type fileError = object + method code : int readonly_prop +end -class type ['a] progressEvent = - object - inherit ['a] event +class type ['a] progressEvent = object + inherit ['a] event - method lengthComputable : bool t readonly_prop + method lengthComputable : bool t readonly_prop - method loaded : int readonly_prop + method loaded : int readonly_prop - method total : int readonly_prop - end + method total : int readonly_prop +end -class type progressEventTarget = - object ('self) - method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop +class type progressEventTarget = object ('self) + method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop - end + method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop +end type readyState = | EMPTY | LOADING | DONE -class type fileReader = - object ('self) - method readAsArrayBuffer : #blob t -> unit meth +class type fileReader = object ('self) + method readAsArrayBuffer : #blob t -> unit meth - method readAsBinaryString : #blob t -> unit meth + method readAsBinaryString : #blob t -> unit meth - method readAsText : #blob t -> unit meth + method readAsText : #blob t -> unit meth - method readAsText_withEncoding : #blob t -> js_string t -> unit meth + method readAsText_withEncoding : #blob t -> js_string t -> unit meth - method readAsDataURL : #blob t -> unit meth + method readAsDataURL : #blob t -> unit meth - method abort : unit meth + method abort : unit meth - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method result : file_any readonly_prop + method result : file_any readonly_prop - method error : fileError t readonly_prop + method error : fileError t readonly_prop - inherit progressEventTarget - end + inherit progressEventTarget +end module ReaderEvent = struct type typ = fileReader progressEvent t Dom.Event.typ diff --git a/lib/js_of_ocaml/file.mli b/lib/js_of_ocaml/file.mli index d922521b1d..4f65c8afbd 100644 --- a/lib/js_of_ocaml/file.mli +++ b/lib/js_of_ocaml/file.mli @@ -23,16 +23,15 @@ open Js open Dom -class type blob = - object - method size : int readonly_prop +class type blob = object + method size : int readonly_prop - method _type : js_string t readonly_prop + method _type : js_string t readonly_prop - method slice : int -> int -> blob t meth + method slice : int -> int -> blob t meth - method slice_withContentType : int -> int -> js_string t -> blob t meth - end + method slice_withContentType : int -> int -> js_string t -> blob t meth +end type 'a make_blob = ?contentType:string -> ?endings:[ `Transparent | `Native ] -> 'a -> blob t @@ -49,14 +48,13 @@ val blob_from_any : list make_blob -class type file = - object - inherit blob +class type file = object + inherit blob - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method lastModifiedDate : js_string t readonly_prop - end + method lastModifiedDate : js_string t readonly_prop +end type file_any @@ -72,82 +70,77 @@ module CoerceTo : sig val arrayBuffer : file_any -> Typed_array.arrayBuffer t Opt.t end -class type fileList = - object - inherit [file] Dom.nodeList - end +class type fileList = object + inherit [file] Dom.nodeList +end -class type fileError = - object - method code : int readonly_prop - end +class type fileError = object + method code : int readonly_prop +end (* {2 Events} *) -class type ['a] progressEvent = - object - inherit ['a] event +class type ['a] progressEvent = object + inherit ['a] event - method lengthComputable : bool t readonly_prop + method lengthComputable : bool t readonly_prop - method loaded : int readonly_prop + method loaded : int readonly_prop - method total : int readonly_prop - end + method total : int readonly_prop +end -class type progressEventTarget = - object ('self) - method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop +class type progressEventTarget = object ('self) + method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop - end + method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop +end type readyState = | EMPTY | LOADING | DONE -class type fileReader = - object ('self) - method readAsArrayBuffer : #blob t -> unit meth +class type fileReader = object ('self) + method readAsArrayBuffer : #blob t -> unit meth - method readAsBinaryString : #blob t -> unit meth + method readAsBinaryString : #blob t -> unit meth - method readAsText : #blob t -> unit meth + method readAsText : #blob t -> unit meth - method readAsText_withEncoding : #blob t -> js_string t -> unit meth + method readAsText_withEncoding : #blob t -> js_string t -> unit meth - method readAsDataURL : #blob t -> unit meth + method readAsDataURL : #blob t -> unit meth - method abort : unit meth + method abort : unit meth - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method result : file_any readonly_prop + method result : file_any readonly_prop - method error : fileError t readonly_prop + method error : fileError t readonly_prop - method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onloadstart : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onprogress : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onload : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onabort : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onerror : ('self t, 'self progressEvent t) event_listener writeonly_prop - method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop + method onloadend : ('self t, 'self progressEvent t) event_listener writeonly_prop - inherit progressEventTarget - end + inherit progressEventTarget +end module ReaderEvent : sig type typ = fileReader progressEvent t Dom.Event.typ diff --git a/lib/js_of_ocaml/firebug.ml b/lib/js_of_ocaml/firebug.ml index c136e46b84..2a712d334c 100644 --- a/lib/js_of_ocaml/firebug.ml +++ b/lib/js_of_ocaml/firebug.ml @@ -21,108 +21,107 @@ open Js open! Import -class type console = - object - method log : _ -> unit meth +class type console = object + method log : _ -> unit meth - method log_2 : _ -> _ -> unit meth + method log_2 : _ -> _ -> unit meth - method log_3 : _ -> _ -> _ -> unit meth + method log_3 : _ -> _ -> _ -> unit meth - method log_4 : _ -> _ -> _ -> _ -> unit meth + method log_4 : _ -> _ -> _ -> _ -> unit meth - method log_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method log_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method log_6 : _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_6 : _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method log_7 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_7 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method log_8 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_8 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method debug : _ -> unit meth + method debug : _ -> unit meth - method debug_2 : _ -> _ -> unit meth + method debug_2 : _ -> _ -> unit meth - method debug_3 : _ -> _ -> _ -> unit meth + method debug_3 : _ -> _ -> _ -> unit meth - method debug_4 : _ -> _ -> _ -> _ -> unit meth + method debug_4 : _ -> _ -> _ -> _ -> unit meth - method debug_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method debug_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method info : _ -> unit meth + method info : _ -> unit meth - method info_2 : _ -> _ -> unit meth + method info_2 : _ -> _ -> unit meth - method info_3 : _ -> _ -> _ -> unit meth + method info_3 : _ -> _ -> _ -> unit meth - method info_4 : _ -> _ -> _ -> _ -> unit meth + method info_4 : _ -> _ -> _ -> _ -> unit meth - method info_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method info_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method warn : _ -> unit meth + method warn : _ -> unit meth - method warn_2 : _ -> _ -> unit meth + method warn_2 : _ -> _ -> unit meth - method warn_3 : _ -> _ -> _ -> unit meth + method warn_3 : _ -> _ -> _ -> unit meth - method warn_4 : _ -> _ -> _ -> _ -> unit meth + method warn_4 : _ -> _ -> _ -> _ -> unit meth - method warn_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method warn_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method error : _ -> unit meth + method error : _ -> unit meth - method error_2 : _ -> _ -> unit meth + method error_2 : _ -> _ -> unit meth - method error_3 : _ -> _ -> _ -> unit meth + method error_3 : _ -> _ -> _ -> unit meth - method error_4 : _ -> _ -> _ -> _ -> unit meth + method error_4 : _ -> _ -> _ -> _ -> unit meth - method error_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method error_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method assert_ : bool t -> unit meth + method assert_ : bool t -> unit meth - method assert_1 : bool t -> _ -> unit meth + method assert_1 : bool t -> _ -> unit meth - method assert_2 : bool t -> _ -> _ -> unit meth + method assert_2 : bool t -> _ -> _ -> unit meth - method assert_3 : bool t -> _ -> _ -> _ -> unit meth + method assert_3 : bool t -> _ -> _ -> _ -> unit meth - method assert_4 : bool t -> _ -> _ -> _ -> _ -> unit meth + method assert_4 : bool t -> _ -> _ -> _ -> _ -> unit meth - method assert_5 : bool t -> _ -> _ -> _ -> _ -> _ -> unit meth + method assert_5 : bool t -> _ -> _ -> _ -> _ -> _ -> unit meth - method dir : _ -> unit meth + method dir : _ -> unit meth - method dirxml : Dom.node t -> unit meth + method dirxml : Dom.node t -> unit meth - method trace : unit meth + method trace : unit meth - method group : _ -> unit meth + method group : _ -> unit meth - method group_2 : _ -> _ -> unit meth + method group_2 : _ -> _ -> unit meth - method group_3 : _ -> _ -> _ -> unit meth + method group_3 : _ -> _ -> _ -> unit meth - method group_4 : _ -> _ -> _ -> _ -> unit meth + method group_4 : _ -> _ -> _ -> _ -> unit meth - method group_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method group_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method groupCollapsed : _ -> unit meth + method groupCollapsed : _ -> unit meth - method groupCollapsed_2 : _ -> _ -> unit meth + method groupCollapsed_2 : _ -> _ -> unit meth - method groupCollapsed_3 : _ -> _ -> _ -> unit meth + method groupCollapsed_3 : _ -> _ -> _ -> unit meth - method groupCollapsed_4 : _ -> _ -> _ -> _ -> unit meth + method groupCollapsed_4 : _ -> _ -> _ -> _ -> unit meth - method groupCollapsed_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method groupCollapsed_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method groupEnd : unit meth + method groupEnd : unit meth - method time : js_string t -> unit meth + method time : js_string t -> unit meth - method timeEnd : js_string t -> unit meth - end + method timeEnd : js_string t -> unit meth +end external get_console : unit -> console t = "caml_js_get_console" diff --git a/lib/js_of_ocaml/firebug.mli b/lib/js_of_ocaml/firebug.mli index fd96e1076c..fdf94f9f9f 100644 --- a/lib/js_of_ocaml/firebug.mli +++ b/lib/js_of_ocaml/firebug.mli @@ -25,107 +25,106 @@ The Firebug console API open Js -class type console = - object - method log : _ -> unit meth +class type console = object + method log : _ -> unit meth - method log_2 : _ -> _ -> unit meth + method log_2 : _ -> _ -> unit meth - method log_3 : _ -> _ -> _ -> unit meth + method log_3 : _ -> _ -> _ -> unit meth - method log_4 : _ -> _ -> _ -> _ -> unit meth + method log_4 : _ -> _ -> _ -> _ -> unit meth - method log_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method log_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method log_6 : _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_6 : _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method log_7 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_7 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method log_8 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth + method log_8 : _ -> _ -> _ -> _ -> _ -> _ -> _ -> _ -> unit meth - method debug : _ -> unit meth + method debug : _ -> unit meth - method debug_2 : _ -> _ -> unit meth + method debug_2 : _ -> _ -> unit meth - method debug_3 : _ -> _ -> _ -> unit meth + method debug_3 : _ -> _ -> _ -> unit meth - method debug_4 : _ -> _ -> _ -> _ -> unit meth + method debug_4 : _ -> _ -> _ -> _ -> unit meth - method debug_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method debug_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method info : _ -> unit meth + method info : _ -> unit meth - method info_2 : _ -> _ -> unit meth + method info_2 : _ -> _ -> unit meth - method info_3 : _ -> _ -> _ -> unit meth + method info_3 : _ -> _ -> _ -> unit meth - method info_4 : _ -> _ -> _ -> _ -> unit meth + method info_4 : _ -> _ -> _ -> _ -> unit meth - method info_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method info_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method warn : _ -> unit meth + method warn : _ -> unit meth - method warn_2 : _ -> _ -> unit meth + method warn_2 : _ -> _ -> unit meth - method warn_3 : _ -> _ -> _ -> unit meth + method warn_3 : _ -> _ -> _ -> unit meth - method warn_4 : _ -> _ -> _ -> _ -> unit meth + method warn_4 : _ -> _ -> _ -> _ -> unit meth - method warn_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method warn_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method error : _ -> unit meth + method error : _ -> unit meth - method error_2 : _ -> _ -> unit meth + method error_2 : _ -> _ -> unit meth - method error_3 : _ -> _ -> _ -> unit meth + method error_3 : _ -> _ -> _ -> unit meth - method error_4 : _ -> _ -> _ -> _ -> unit meth + method error_4 : _ -> _ -> _ -> _ -> unit meth - method error_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method error_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method assert_ : bool t -> unit meth + method assert_ : bool t -> unit meth - method assert_1 : bool t -> _ -> unit meth + method assert_1 : bool t -> _ -> unit meth - method assert_2 : bool t -> _ -> _ -> unit meth + method assert_2 : bool t -> _ -> _ -> unit meth - method assert_3 : bool t -> _ -> _ -> _ -> unit meth + method assert_3 : bool t -> _ -> _ -> _ -> unit meth - method assert_4 : bool t -> _ -> _ -> _ -> _ -> unit meth + method assert_4 : bool t -> _ -> _ -> _ -> _ -> unit meth - method assert_5 : bool t -> _ -> _ -> _ -> _ -> _ -> unit meth + method assert_5 : bool t -> _ -> _ -> _ -> _ -> _ -> unit meth - method dir : _ -> unit meth + method dir : _ -> unit meth - method dirxml : Dom.node t -> unit meth + method dirxml : Dom.node t -> unit meth - method trace : unit meth + method trace : unit meth - method group : _ -> unit meth + method group : _ -> unit meth - method group_2 : _ -> _ -> unit meth + method group_2 : _ -> _ -> unit meth - method group_3 : _ -> _ -> _ -> unit meth + method group_3 : _ -> _ -> _ -> unit meth - method group_4 : _ -> _ -> _ -> _ -> unit meth + method group_4 : _ -> _ -> _ -> _ -> unit meth - method group_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method group_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method groupCollapsed : _ -> unit meth + method groupCollapsed : _ -> unit meth - method groupCollapsed_2 : _ -> _ -> unit meth + method groupCollapsed_2 : _ -> _ -> unit meth - method groupCollapsed_3 : _ -> _ -> _ -> unit meth + method groupCollapsed_3 : _ -> _ -> _ -> unit meth - method groupCollapsed_4 : _ -> _ -> _ -> _ -> unit meth + method groupCollapsed_4 : _ -> _ -> _ -> _ -> unit meth - method groupCollapsed_5 : _ -> _ -> _ -> _ -> _ -> unit meth + method groupCollapsed_5 : _ -> _ -> _ -> _ -> _ -> unit meth - method groupEnd : unit meth + method groupEnd : unit meth - method time : js_string t -> unit meth + method time : js_string t -> unit meth - method timeEnd : js_string t -> unit meth - end + method timeEnd : js_string t -> unit meth +end val console : console t diff --git a/lib/js_of_ocaml/form.ml b/lib/js_of_ocaml/form.ml index e6f676711f..0b7b3fa217 100644 --- a/lib/js_of_ocaml/form.ml +++ b/lib/js_of_ocaml/form.ml @@ -22,12 +22,11 @@ open Js open Dom_html open! Import -class type formData = - object - method append : js_string t -> js_string t -> unit meth +class type formData = object + method append : js_string t -> js_string t -> unit meth - method append_blob : js_string t -> File.blob t -> unit meth - end + method append_blob : js_string t -> File.blob t -> unit meth +end let formData : formData t constr = Js.Unsafe.global##._FormData @@ -50,14 +49,13 @@ let rec filter_map f = function | None -> filter_map f q | Some v' -> v' :: filter_map f q) -class type submittableElement = - object - method disabled : bool t prop +class type submittableElement = object + method disabled : bool t prop - method name : js_string t readonly_prop + method name : js_string t readonly_prop - method value : js_string t prop - end + method value : js_string t prop +end let have_content (elt : submittableElement t) = elt##.name##.length > 0 && not (Js.to_bool elt##.disabled) @@ -87,14 +85,13 @@ let get_select_val (elt : selectElement t) = else [ name, `String elt##.value ] else [] -class type file_input = - object - inherit inputElement +class type file_input = object + inherit inputElement - method files : File.fileList t optdef readonly_prop + method files : File.fileList t optdef readonly_prop - method multiple : bool optdef readonly_prop - end + method multiple : bool optdef readonly_prop +end let get_input_val ?(get = false) (elt : inputElement t) = if have_content (elt :> submittableElement t) diff --git a/lib/js_of_ocaml/form.mli b/lib/js_of_ocaml/form.mli index fddb1dd2c6..60247cc423 100644 --- a/lib/js_of_ocaml/form.mli +++ b/lib/js_of_ocaml/form.mli @@ -21,12 +21,11 @@ open Js (** This module provides functions to manipulate forms. *) -class type formData = - object - method append : js_string t -> js_string t -> unit meth +class type formData = object + method append : js_string t -> js_string t -> unit meth - method append_blob : js_string t -> File.blob t -> unit meth - end + method append_blob : js_string t -> File.blob t -> unit meth +end val formData : formData t constr diff --git a/lib/js_of_ocaml/geolocation.ml b/lib/js_of_ocaml/geolocation.ml index 65637e25dd..38d16630f3 100644 --- a/lib/js_of_ocaml/geolocation.ml +++ b/lib/js_of_ocaml/geolocation.ml @@ -22,68 +22,63 @@ type positionErrorCode type watchId -class type coordinates = - object - method latitude : float Js.readonly_prop +class type coordinates = object + method latitude : float Js.readonly_prop - method longitude : float Js.readonly_prop + method longitude : float Js.readonly_prop - method altitude : float Js.opt Js.readonly_prop + method altitude : float Js.opt Js.readonly_prop - method accuracy : float Js.readonly_prop + method accuracy : float Js.readonly_prop - method altitudeAccuracy : float Js.opt Js.readonly_prop + method altitudeAccuracy : float Js.opt Js.readonly_prop - method heading : float Js.opt Js.readonly_prop + method heading : float Js.opt Js.readonly_prop - method speed : float Js.opt Js.readonly_prop - end + method speed : float Js.opt Js.readonly_prop +end -class type position = - object - method coords : coordinates Js.t Js.readonly_prop +class type position = object + method coords : coordinates Js.t Js.readonly_prop - method timestamp : Js.date Js.readonly_prop - end + method timestamp : Js.date Js.readonly_prop +end -class type positionOptions = - object - method enableHighAccuracy : bool Js.writeonly_prop +class type positionOptions = object + method enableHighAccuracy : bool Js.writeonly_prop - method timeout : int Js.writeonly_prop + method timeout : int Js.writeonly_prop - method maximumAge : int Js.writeonly_prop - end + method maximumAge : int Js.writeonly_prop +end -class type positionError = - object - method _PERMISSION_DENIED_ : positionErrorCode Js.readonly_prop +class type positionError = object + method _PERMISSION_DENIED_ : positionErrorCode Js.readonly_prop - method _POSITION_UNAVAILABLE_ : positionErrorCode Js.readonly_prop + method _POSITION_UNAVAILABLE_ : positionErrorCode Js.readonly_prop - method _TIMEOUT : positionErrorCode Js.readonly_prop + method _TIMEOUT : positionErrorCode Js.readonly_prop - method code : positionErrorCode Js.readonly_prop + method code : positionErrorCode Js.readonly_prop - method message : Js.js_string Js.t Js.readonly_prop - end + method message : Js.js_string Js.t Js.readonly_prop +end -class type geolocation = - object - method getCurrentPosition : - (position Js.t -> unit) Js.callback - -> (positionError Js.t -> unit) Js.callback - -> positionOptions Js.t - -> unit Js.meth +class type geolocation = object + method getCurrentPosition : + (position Js.t -> unit) Js.callback + -> (positionError Js.t -> unit) Js.callback + -> positionOptions Js.t + -> unit Js.meth - method watchPosition : - (position Js.t -> unit) Js.callback - -> (positionError Js.t -> unit) Js.callback - -> positionOptions Js.t - -> watchId Js.meth + method watchPosition : + (position Js.t -> unit) Js.callback + -> (positionError Js.t -> unit) Js.callback + -> positionOptions Js.t + -> watchId Js.meth - method clearWatch : watchId -> unit Js.meth - end + method clearWatch : watchId -> unit Js.meth +end let empty_position_options () = Js.Unsafe.obj [||] diff --git a/lib/js_of_ocaml/geolocation.mli b/lib/js_of_ocaml/geolocation.mli index d816d90037..f00a827d55 100644 --- a/lib/js_of_ocaml/geolocation.mli +++ b/lib/js_of_ocaml/geolocation.mli @@ -44,68 +44,63 @@ type positionErrorCode type watchId -class type coordinates = - object - method latitude : float Js.readonly_prop +class type coordinates = object + method latitude : float Js.readonly_prop - method longitude : float Js.readonly_prop + method longitude : float Js.readonly_prop - method altitude : float Js.opt Js.readonly_prop + method altitude : float Js.opt Js.readonly_prop - method accuracy : float Js.readonly_prop + method accuracy : float Js.readonly_prop - method altitudeAccuracy : float Js.opt Js.readonly_prop + method altitudeAccuracy : float Js.opt Js.readonly_prop - method heading : float Js.opt Js.readonly_prop + method heading : float Js.opt Js.readonly_prop - method speed : float Js.opt Js.readonly_prop - end + method speed : float Js.opt Js.readonly_prop +end -class type position = - object - method coords : coordinates Js.t Js.readonly_prop +class type position = object + method coords : coordinates Js.t Js.readonly_prop - method timestamp : Js.date Js.readonly_prop - end + method timestamp : Js.date Js.readonly_prop +end -class type positionOptions = - object - method enableHighAccuracy : bool Js.writeonly_prop +class type positionOptions = object + method enableHighAccuracy : bool Js.writeonly_prop - method timeout : int Js.writeonly_prop + method timeout : int Js.writeonly_prop - method maximumAge : int Js.writeonly_prop - end + method maximumAge : int Js.writeonly_prop +end -class type positionError = - object - method _PERMISSION_DENIED_ : positionErrorCode Js.readonly_prop +class type positionError = object + method _PERMISSION_DENIED_ : positionErrorCode Js.readonly_prop - method _POSITION_UNAVAILABLE_ : positionErrorCode Js.readonly_prop + method _POSITION_UNAVAILABLE_ : positionErrorCode Js.readonly_prop - method _TIMEOUT : positionErrorCode Js.readonly_prop + method _TIMEOUT : positionErrorCode Js.readonly_prop - method code : positionErrorCode Js.readonly_prop + method code : positionErrorCode Js.readonly_prop - method message : Js.js_string Js.t Js.readonly_prop - end + method message : Js.js_string Js.t Js.readonly_prop +end -class type geolocation = - object - method getCurrentPosition : - (position Js.t -> unit) Js.callback - -> (positionError Js.t -> unit) Js.callback - -> positionOptions Js.t - -> unit Js.meth +class type geolocation = object + method getCurrentPosition : + (position Js.t -> unit) Js.callback + -> (positionError Js.t -> unit) Js.callback + -> positionOptions Js.t + -> unit Js.meth - method watchPosition : - (position Js.t -> unit) Js.callback - -> (positionError Js.t -> unit) Js.callback - -> positionOptions Js.t - -> watchId Js.meth + method watchPosition : + (position Js.t -> unit) Js.callback + -> (positionError Js.t -> unit) Js.callback + -> positionOptions Js.t + -> watchId Js.meth - method clearWatch : watchId -> unit Js.meth - end + method clearWatch : watchId -> unit Js.meth +end val empty_position_options : unit -> positionOptions Js.t diff --git a/lib/js_of_ocaml/intersectionObserver.ml b/lib/js_of_ocaml/intersectionObserver.ml index 41146ca6c4..6c3cac2b8e 100644 --- a/lib/js_of_ocaml/intersectionObserver.ml +++ b/lib/js_of_ocaml/intersectionObserver.ml @@ -1,45 +1,42 @@ -class type intersectionObserverEntry = - object - method target : Dom.node Js.t Js.readonly_prop +class type intersectionObserverEntry = object + method target : Dom.node Js.t Js.readonly_prop - method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop + method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop - method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop + method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop - method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop + method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop - method intersectionRatio : float Js.readonly_prop + method intersectionRatio : float Js.readonly_prop - method isIntersecting : bool Js.t Js.readonly_prop + method isIntersecting : bool Js.t Js.readonly_prop - method time : float Js.readonly_prop - end + method time : float Js.readonly_prop +end -class type intersectionObserverOptions = - object - method root : Dom.node Js.t Js.writeonly_prop +class type intersectionObserverOptions = object + method root : Dom.node Js.t Js.writeonly_prop - method rootMargin : Js.js_string Js.t Js.writeonly_prop + method rootMargin : Js.js_string Js.t Js.writeonly_prop - method threshold : float Js.js_array Js.t Js.writeonly_prop - end + method threshold : float Js.js_array Js.t Js.writeonly_prop +end -class type intersectionObserver = - object - method root : Dom.node Js.t Js.opt Js.readonly_prop +class type intersectionObserver = object + method root : Dom.node Js.t Js.opt Js.readonly_prop - method rootMargin : Js.js_string Js.t Js.readonly_prop + method rootMargin : Js.js_string Js.t Js.readonly_prop - method thresholds : float Js.js_array Js.t Js.readonly_prop + method thresholds : float Js.js_array Js.t Js.readonly_prop - method observe : #Dom.node Js.t -> unit Js.meth + method observe : #Dom.node Js.t -> unit Js.meth - method unobserve : #Dom.node Js.t -> unit Js.meth + method unobserve : #Dom.node Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : intersectionObserverEntry Js.t Js.js_array Js.meth - end + method takeRecords : intersectionObserverEntry Js.t Js.js_array Js.meth +end let empty_intersection_observer_options () : intersectionObserverOptions Js.t = Js.Unsafe.obj [||] diff --git a/lib/js_of_ocaml/intersectionObserver.mli b/lib/js_of_ocaml/intersectionObserver.mli index 8aa4f59692..e4920df65b 100644 --- a/lib/js_of_ocaml/intersectionObserver.mli +++ b/lib/js_of_ocaml/intersectionObserver.mli @@ -4,48 +4,45 @@ https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API *) -class type intersectionObserverEntry = - object - method target : Dom.node Js.t Js.readonly_prop +class type intersectionObserverEntry = object + method target : Dom.node Js.t Js.readonly_prop - method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop + method boundingClientRect : Dom_html.clientRect Js.t Js.readonly_prop - method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop + method rootBounds : Dom_html.clientRect Js.t Js.opt Js.readonly_prop - method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop + method intersectionRect : Dom_html.clientRect Js.t Js.readonly_prop - method intersectionRatio : float Js.readonly_prop + method intersectionRatio : float Js.readonly_prop - method isIntersecting : bool Js.t Js.readonly_prop + method isIntersecting : bool Js.t Js.readonly_prop - method time : float Js.readonly_prop - end + method time : float Js.readonly_prop +end -class type intersectionObserverOptions = - object - method root : Dom.node Js.t Js.writeonly_prop +class type intersectionObserverOptions = object + method root : Dom.node Js.t Js.writeonly_prop - method rootMargin : Js.js_string Js.t Js.writeonly_prop + method rootMargin : Js.js_string Js.t Js.writeonly_prop - method threshold : float Js.js_array Js.t Js.writeonly_prop - end + method threshold : float Js.js_array Js.t Js.writeonly_prop +end -class type intersectionObserver = - object - method root : Dom.node Js.t Js.opt Js.readonly_prop +class type intersectionObserver = object + method root : Dom.node Js.t Js.opt Js.readonly_prop - method rootMargin : Js.js_string Js.t Js.readonly_prop + method rootMargin : Js.js_string Js.t Js.readonly_prop - method thresholds : float Js.js_array Js.t Js.readonly_prop + method thresholds : float Js.js_array Js.t Js.readonly_prop - method observe : #Dom.node Js.t -> unit Js.meth + method observe : #Dom.node Js.t -> unit Js.meth - method unobserve : #Dom.node Js.t -> unit Js.meth + method unobserve : #Dom.node Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : intersectionObserverEntry Js.t Js.js_array Js.meth - end + method takeRecords : intersectionObserverEntry Js.t Js.js_array Js.meth +end val empty_intersection_observer_options : unit -> intersectionObserverOptions Js.t diff --git a/lib/js_of_ocaml/intl.ml b/lib/js_of_ocaml/intl.ml index 4a9c8a1741..6a71b5d2cb 100644 --- a/lib/js_of_ocaml/intl.ml +++ b/lib/js_of_ocaml/intl.ml @@ -19,76 +19,70 @@ open! Import module type Shared = sig - class type object_options = - object - method localeMatcher : Js.js_string Js.t Js.prop - end + class type object_options = object + method localeMatcher : Js.js_string Js.t Js.prop + end val object_options : unit -> object_options Js.t - class type _object = - object - method supportedLocalesOf : - Js.js_string Js.t Js.js_array Js.t - -> object_options Js.t Js.optdef - -> Js.js_string Js.t Js.js_array Js.t Js.meth - end + class type _object = object + method supportedLocalesOf : + Js.js_string Js.t Js.js_array Js.t + -> object_options Js.t Js.optdef + -> Js.js_string Js.t Js.js_array Js.t Js.meth + end end module Shared : Shared = struct - class type object_options = - object - method localeMatcher : Js.js_string Js.t Js.prop - end + class type object_options = object + method localeMatcher : Js.js_string Js.t Js.prop + end let object_options () = object%js val mutable localeMatcher = Js.string "best fit" end - class type _object = - object - method supportedLocalesOf : - Js.js_string Js.t Js.js_array Js.t - -> object_options Js.t Js.optdef - -> Js.js_string Js.t Js.js_array Js.t Js.meth - end + class type _object = object + method supportedLocalesOf : + Js.js_string Js.t Js.js_array Js.t + -> object_options Js.t Js.optdef + -> Js.js_string Js.t Js.js_array Js.t Js.meth + end end module Collator = struct include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method usage : Js.js_string Js.t Js.readonly_prop + method usage : Js.js_string Js.t Js.readonly_prop - method sensitivity : Js.js_string Js.t Js.readonly_prop + method sensitivity : Js.js_string Js.t Js.readonly_prop - method ignorePunctuation : bool Js.t Js.readonly_prop + method ignorePunctuation : bool Js.t Js.readonly_prop - method collation : Js.js_string Js.t Js.readonly_prop + method collation : Js.js_string Js.t Js.readonly_prop - method numeric : bool Js.t Js.readonly_prop + method numeric : bool Js.t Js.readonly_prop - method caseFirst : Js.js_string Js.t Js.readonly_prop - end + method caseFirst : Js.js_string Js.t Js.readonly_prop + end - class type options = - object - method localeMatcher : Js.js_string Js.t Js.prop + class type options = object + method localeMatcher : Js.js_string Js.t Js.prop - method usage : Js.js_string Js.t Js.prop + method usage : Js.js_string Js.t Js.prop - method sensitivity : Js.js_string Js.t Js.prop + method sensitivity : Js.js_string Js.t Js.prop - method ignorePunctuation : bool Js.t Js.prop + method ignorePunctuation : bool Js.t Js.prop - method numeric : bool Js.t Js.prop + method numeric : bool Js.t Js.prop - method caseFirst : Js.js_string Js.t Js.prop - end + method caseFirst : Js.js_string Js.t Js.prop + end let options () = object%js @@ -105,90 +99,87 @@ module Collator = struct val mutable caseFirst = Js.string "false" end - class type t = - object - method compare : (Js.js_string Js.t -> Js.js_string Js.t -> int) Js.readonly_prop + class type t = object + method compare : (Js.js_string Js.t -> Js.js_string Js.t -> int) Js.readonly_prop - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module DateTimeFormat = struct include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method calendar : Js.js_string Js.t Js.readonly_prop + method calendar : Js.js_string Js.t Js.readonly_prop - method numberingSystem : Js.js_string Js.t Js.readonly_prop + method numberingSystem : Js.js_string Js.t Js.readonly_prop - method timeZone : Js.js_string Js.t Js.readonly_prop + method timeZone : Js.js_string Js.t Js.readonly_prop - method hour12 : bool Js.t Js.readonly_prop + method hour12 : bool Js.t Js.readonly_prop - method weekday : Js.js_string Js.t Js.optdef_prop + method weekday : Js.js_string Js.t Js.optdef_prop - method era : Js.js_string Js.t Js.optdef_prop + method era : Js.js_string Js.t Js.optdef_prop - method year : Js.js_string Js.t Js.optdef_prop + method year : Js.js_string Js.t Js.optdef_prop - method month : Js.js_string Js.t Js.optdef_prop + method month : Js.js_string Js.t Js.optdef_prop - method day : Js.js_string Js.t Js.optdef_prop + method day : Js.js_string Js.t Js.optdef_prop - method hour : Js.js_string Js.t Js.optdef_prop + method hour : Js.js_string Js.t Js.optdef_prop - method minute : Js.js_string Js.t Js.optdef_prop + method minute : Js.js_string Js.t Js.optdef_prop - method second : Js.js_string Js.t Js.optdef_prop + method second : Js.js_string Js.t Js.optdef_prop - method timeZoneName : Js.js_string Js.t Js.optdef_prop - end + method timeZoneName : Js.js_string Js.t Js.optdef_prop + end - class type options = - object - method dateStyle : Js.js_string Js.t Js.optdef Js.prop + class type options = object + method dateStyle : Js.js_string Js.t Js.optdef Js.prop - method timeStyle : Js.js_string Js.t Js.optdef Js.prop + method timeStyle : Js.js_string Js.t Js.optdef Js.prop - method calendar : Js.js_string Js.t Js.optdef Js.prop + method calendar : Js.js_string Js.t Js.optdef Js.prop - method dayPeriod : Js.js_string Js.t Js.optdef Js.prop + method dayPeriod : Js.js_string Js.t Js.optdef Js.prop - method numberingSystem : Js.js_string Js.t Js.optdef Js.prop + method numberingSystem : Js.js_string Js.t Js.optdef Js.prop - method localeMatcher : Js.js_string Js.t Js.prop + method localeMatcher : Js.js_string Js.t Js.prop - method timeZone : Js.js_string Js.t Js.optdef Js.prop + method timeZone : Js.js_string Js.t Js.optdef Js.prop - method hour12 : bool Js.t Js.optdef Js.prop + method hour12 : bool Js.t Js.optdef Js.prop - method hourCycle : Js.js_string Js.t Js.optdef Js.prop + method hourCycle : Js.js_string Js.t Js.optdef Js.prop - method formatMatcher : Js.js_string Js.t Js.prop + method formatMatcher : Js.js_string Js.t Js.prop - method weekday : Js.js_string Js.t Js.optdef Js.prop + method weekday : Js.js_string Js.t Js.optdef Js.prop - method era : Js.js_string Js.t Js.optdef Js.prop + method era : Js.js_string Js.t Js.optdef Js.prop - method year : Js.js_string Js.t Js.optdef Js.prop + method year : Js.js_string Js.t Js.optdef Js.prop - method month : Js.js_string Js.t Js.optdef Js.prop + method month : Js.js_string Js.t Js.optdef Js.prop - method day : Js.js_string Js.t Js.optdef Js.prop + method day : Js.js_string Js.t Js.optdef Js.prop - method hour : Js.js_string Js.t Js.optdef Js.prop + method hour : Js.js_string Js.t Js.optdef Js.prop - method minute : Js.js_string Js.t Js.optdef Js.prop + method minute : Js.js_string Js.t Js.optdef Js.prop - method second : Js.js_string Js.t Js.optdef Js.prop + method second : Js.js_string Js.t Js.optdef Js.prop - method fractionalSecondDigits : int Js.optdef Js.prop + method fractionalSecondDigits : int Js.optdef Js.prop - method timeZoneName : Js.js_string Js.t Js.optdef Js.prop - end + method timeZoneName : Js.js_string Js.t Js.optdef Js.prop + end let options () : options Js.t = object%js @@ -233,96 +224,92 @@ module DateTimeFormat = struct val mutable timeZoneName = Js.undefined end - class type format_part = - object - method _type : Js.js_string Js.t Js.readonly_prop + class type format_part = object + method _type : Js.js_string Js.t Js.readonly_prop - method _value : Js.js_string Js.t Js.readonly_prop - end + method _value : Js.js_string Js.t Js.readonly_prop + end - class type t = - object - method format : (Js.date Js.t -> Js.js_string Js.t) Js.readonly_prop + class type t = object + method format : (Js.date Js.t -> Js.js_string Js.t) Js.readonly_prop - method formatToParts : - Js.date Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth + method formatToParts : + Js.date Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module NumberFormat = struct include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method numberingSystem : Js.js_string Js.t Js.readonly_prop + method numberingSystem : Js.js_string Js.t Js.readonly_prop - method style : Js.js_string Js.t Js.readonly_prop + method style : Js.js_string Js.t Js.readonly_prop - method currency : Js.js_string Js.t Js.optdef_prop + method currency : Js.js_string Js.t Js.optdef_prop - method currencyDisplay : Js.js_string Js.t Js.optdef_prop + method currencyDisplay : Js.js_string Js.t Js.optdef_prop - method useGrouping : bool Js.t Js.readonly_prop + method useGrouping : bool Js.t Js.readonly_prop - method minimumIntegerDigits : int Js.optdef_prop + method minimumIntegerDigits : int Js.optdef_prop - method minimumFractionDigits : int Js.optdef_prop + method minimumFractionDigits : int Js.optdef_prop - method maximumFractionDigits : int Js.optdef_prop + method maximumFractionDigits : int Js.optdef_prop - method minimumSignificantDigits : int Js.optdef_prop + method minimumSignificantDigits : int Js.optdef_prop - method maximumSignificantDigits : int Js.optdef_prop - end + method maximumSignificantDigits : int Js.optdef_prop + end - class type options = - object - method compactDisplay : Js.js_string Js.t Js.optdef Js.prop + class type options = object + method compactDisplay : Js.js_string Js.t Js.optdef Js.prop - method currency : Js.js_string Js.t Js.optdef Js.prop + method currency : Js.js_string Js.t Js.optdef Js.prop - method currencyDisplay : Js.js_string Js.t Js.optdef Js.prop + method currencyDisplay : Js.js_string Js.t Js.optdef Js.prop - method currencySign : Js.js_string Js.t Js.optdef Js.prop + method currencySign : Js.js_string Js.t Js.optdef Js.prop - method localeMatcher : Js.js_string Js.t Js.prop + method localeMatcher : Js.js_string Js.t Js.prop - method notation : Js.js_string Js.t Js.optdef Js.prop + method notation : Js.js_string Js.t Js.optdef Js.prop - method numberingSystem : Js.js_string Js.t Js.optdef Js.prop + method numberingSystem : Js.js_string Js.t Js.optdef Js.prop - method signDisplay : Js.js_string Js.t Js.optdef Js.prop + method signDisplay : Js.js_string Js.t Js.optdef Js.prop - method style : Js.js_string Js.t Js.prop + method style : Js.js_string Js.t Js.prop - method unit : Js.js_string Js.t Js.optdef Js.prop + method unit : Js.js_string Js.t Js.optdef Js.prop - method unitDisplay : Js.js_string Js.t Js.optdef Js.prop + method unitDisplay : Js.js_string Js.t Js.optdef Js.prop - method useGrouping : bool Js.t Js.prop + method useGrouping : bool Js.t Js.prop - method roundingMode : Js.js_string Js.t Js.optdef Js.prop + method roundingMode : Js.js_string Js.t Js.optdef Js.prop - method roundingPriority : Js.js_string Js.t Js.optdef Js.prop + method roundingPriority : Js.js_string Js.t Js.optdef Js.prop - method roundingIncrement : Js.js_string Js.t Js.optdef Js.prop + method roundingIncrement : Js.js_string Js.t Js.optdef Js.prop - method trailingZeroDisplay : Js.js_string Js.t Js.optdef Js.prop + method trailingZeroDisplay : Js.js_string Js.t Js.optdef Js.prop - method minimumIntegerDigits : int Js.optdef Js.prop + method minimumIntegerDigits : int Js.optdef Js.prop - method minimumFractionDigits : int Js.optdef Js.prop + method minimumFractionDigits : int Js.optdef Js.prop - method maximumFractionDigits : int Js.optdef Js.prop + method maximumFractionDigits : int Js.optdef Js.prop - method minimumSignificantDigits : int Js.optdef Js.prop + method minimumSignificantDigits : int Js.optdef Js.prop - method maximumSignificantDigits : int Js.optdef Js.prop - end + method maximumSignificantDigits : int Js.optdef Js.prop + end let options () : options Js.t = object%js @@ -369,52 +356,48 @@ module NumberFormat = struct val mutable maximumSignificantDigits = Js.undefined end - class type format_part = - object - method _type : Js.js_string Js.t Js.readonly_prop + class type format_part = object + method _type : Js.js_string Js.t Js.readonly_prop - method _value : Js.js_string Js.t Js.readonly_prop - end + method _value : Js.js_string Js.t Js.readonly_prop + end - class type t = - object - method format : (Js.number Js.t -> Js.js_string Js.t) Js.readonly_prop + class type t = object + method format : (Js.number Js.t -> Js.js_string Js.t) Js.readonly_prop - method formatToParts : - Js.number Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth + method formatToParts : + Js.number Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module PluralRules = struct include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method pluralCategories : Js.js_string Js.t Js.js_array Js.t Js.readonly_prop + method pluralCategories : Js.js_string Js.t Js.js_array Js.t Js.readonly_prop - method _type : Js.js_string Js.t Js.readonly_prop + method _type : Js.js_string Js.t Js.readonly_prop - method minimumIntegerDigits : int Js.optdef_prop + method minimumIntegerDigits : int Js.optdef_prop - method minimumFractionDigits : int Js.optdef_prop + method minimumFractionDigits : int Js.optdef_prop - method maximumFractionDigits : int Js.optdef_prop + method maximumFractionDigits : int Js.optdef_prop - method minimumSignificantDigits : int Js.optdef_prop + method minimumSignificantDigits : int Js.optdef_prop - method maximumSignificantDigits : int Js.optdef_prop - end + method maximumSignificantDigits : int Js.optdef_prop + end - class type options = - object - method localeMatcher : Js.js_string Js.t Js.prop + class type options = object + method localeMatcher : Js.js_string Js.t Js.prop - method _type : Js.js_string Js.t Js.prop - end + method _type : Js.js_string Js.t Js.prop + end let options () : options Js.t = object%js @@ -423,27 +406,25 @@ module PluralRules = struct val mutable _type = Js.string "cardinal" end - class type t = - object - method select : Js.number Js.t -> Js.js_string Js.t Js.meth + class type t = object + method select : Js.number Js.t -> Js.js_string Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end -class type intl = - object - method _Collator : Collator._object Js.t Js.readonly_prop +class type intl = object + method _Collator : Collator._object Js.t Js.readonly_prop - method _DateTimeFormat : DateTimeFormat._object Js.t Js.readonly_prop + method _DateTimeFormat : DateTimeFormat._object Js.t Js.readonly_prop - method _NumberFormat : NumberFormat._object Js.t Js.readonly_prop + method _NumberFormat : NumberFormat._object Js.t Js.readonly_prop - method _PluralRules : PluralRules._object Js.t Js.readonly_prop + method _PluralRules : PluralRules._object Js.t Js.readonly_prop - method getCanonicalLocales : - Js.js_string Js.t Js.js_array Js.t -> Js.js_string Js.t Js.js_array Js.t Js.meth - end + method getCanonicalLocales : + Js.js_string Js.t Js.js_array Js.t -> Js.js_string Js.t Js.js_array Js.t Js.meth +end let intl = Js.Unsafe.global##._Intl diff --git a/lib/js_of_ocaml/intl.mli b/lib/js_of_ocaml/intl.mli index 31e546c785..818628578f 100644 --- a/lib/js_of_ocaml/intl.mli +++ b/lib/js_of_ocaml/intl.mli @@ -420,309 +420,292 @@ if (Intl.is_supported()) then ( @see for the ECMAScript specification. *) module type Shared = sig - class type object_options = - object - method localeMatcher : Js.js_string Js.t Js.prop - end + class type object_options = object + method localeMatcher : Js.js_string Js.t Js.prop + end val object_options : unit -> object_options Js.t - class type _object = - object - method supportedLocalesOf : - Js.js_string Js.t Js.js_array Js.t - -> object_options Js.t Js.optdef - -> Js.js_string Js.t Js.js_array Js.t Js.meth - end + class type _object = object + method supportedLocalesOf : + Js.js_string Js.t Js.js_array Js.t + -> object_options Js.t Js.optdef + -> Js.js_string Js.t Js.js_array Js.t Js.meth + end end module Collator : sig include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method usage : Js.js_string Js.t Js.readonly_prop + method usage : Js.js_string Js.t Js.readonly_prop - method sensitivity : Js.js_string Js.t Js.readonly_prop + method sensitivity : Js.js_string Js.t Js.readonly_prop - method ignorePunctuation : bool Js.t Js.readonly_prop + method ignorePunctuation : bool Js.t Js.readonly_prop - method collation : Js.js_string Js.t Js.readonly_prop + method collation : Js.js_string Js.t Js.readonly_prop - method numeric : bool Js.t Js.readonly_prop + method numeric : bool Js.t Js.readonly_prop - method caseFirst : Js.js_string Js.t Js.readonly_prop - end + method caseFirst : Js.js_string Js.t Js.readonly_prop + end - class type options = - object - method localeMatcher : Js.js_string Js.t Js.prop + class type options = object + method localeMatcher : Js.js_string Js.t Js.prop - method usage : Js.js_string Js.t Js.prop + method usage : Js.js_string Js.t Js.prop - method sensitivity : Js.js_string Js.t Js.prop + method sensitivity : Js.js_string Js.t Js.prop - method ignorePunctuation : bool Js.t Js.prop + method ignorePunctuation : bool Js.t Js.prop - method numeric : bool Js.t Js.prop + method numeric : bool Js.t Js.prop - method caseFirst : Js.js_string Js.t Js.prop - end + method caseFirst : Js.js_string Js.t Js.prop + end val options : unit -> options Js.t - class type t = - object - method compare : (Js.js_string Js.t -> Js.js_string Js.t -> int) Js.readonly_prop + class type t = object + method compare : (Js.js_string Js.t -> Js.js_string Js.t -> int) Js.readonly_prop - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module DateTimeFormat : sig include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method calendar : Js.js_string Js.t Js.readonly_prop + method calendar : Js.js_string Js.t Js.readonly_prop - method numberingSystem : Js.js_string Js.t Js.readonly_prop + method numberingSystem : Js.js_string Js.t Js.readonly_prop - method timeZone : Js.js_string Js.t Js.readonly_prop + method timeZone : Js.js_string Js.t Js.readonly_prop - method hour12 : bool Js.t Js.readonly_prop + method hour12 : bool Js.t Js.readonly_prop - method weekday : Js.js_string Js.t Js.optdef_prop + method weekday : Js.js_string Js.t Js.optdef_prop - method era : Js.js_string Js.t Js.optdef_prop + method era : Js.js_string Js.t Js.optdef_prop - method year : Js.js_string Js.t Js.optdef_prop + method year : Js.js_string Js.t Js.optdef_prop - method month : Js.js_string Js.t Js.optdef_prop + method month : Js.js_string Js.t Js.optdef_prop - method day : Js.js_string Js.t Js.optdef_prop + method day : Js.js_string Js.t Js.optdef_prop - method hour : Js.js_string Js.t Js.optdef_prop + method hour : Js.js_string Js.t Js.optdef_prop - method minute : Js.js_string Js.t Js.optdef_prop + method minute : Js.js_string Js.t Js.optdef_prop - method second : Js.js_string Js.t Js.optdef_prop + method second : Js.js_string Js.t Js.optdef_prop - method timeZoneName : Js.js_string Js.t Js.optdef_prop - end + method timeZoneName : Js.js_string Js.t Js.optdef_prop + end - class type options = - object - method dateStyle : Js.js_string Js.t Js.optdef Js.prop + class type options = object + method dateStyle : Js.js_string Js.t Js.optdef Js.prop - method timeStyle : Js.js_string Js.t Js.optdef Js.prop + method timeStyle : Js.js_string Js.t Js.optdef Js.prop - method calendar : Js.js_string Js.t Js.optdef Js.prop + method calendar : Js.js_string Js.t Js.optdef Js.prop - method dayPeriod : Js.js_string Js.t Js.optdef Js.prop + method dayPeriod : Js.js_string Js.t Js.optdef Js.prop - method numberingSystem : Js.js_string Js.t Js.optdef Js.prop + method numberingSystem : Js.js_string Js.t Js.optdef Js.prop - method localeMatcher : Js.js_string Js.t Js.prop + method localeMatcher : Js.js_string Js.t Js.prop - method timeZone : Js.js_string Js.t Js.optdef Js.prop + method timeZone : Js.js_string Js.t Js.optdef Js.prop - method hour12 : bool Js.t Js.optdef Js.prop + method hour12 : bool Js.t Js.optdef Js.prop - method hourCycle : Js.js_string Js.t Js.optdef Js.prop + method hourCycle : Js.js_string Js.t Js.optdef Js.prop - method formatMatcher : Js.js_string Js.t Js.prop + method formatMatcher : Js.js_string Js.t Js.prop - method weekday : Js.js_string Js.t Js.optdef Js.prop + method weekday : Js.js_string Js.t Js.optdef Js.prop - method era : Js.js_string Js.t Js.optdef Js.prop + method era : Js.js_string Js.t Js.optdef Js.prop - method year : Js.js_string Js.t Js.optdef Js.prop + method year : Js.js_string Js.t Js.optdef Js.prop - method month : Js.js_string Js.t Js.optdef Js.prop + method month : Js.js_string Js.t Js.optdef Js.prop - method day : Js.js_string Js.t Js.optdef Js.prop + method day : Js.js_string Js.t Js.optdef Js.prop - method hour : Js.js_string Js.t Js.optdef Js.prop + method hour : Js.js_string Js.t Js.optdef Js.prop - method minute : Js.js_string Js.t Js.optdef Js.prop + method minute : Js.js_string Js.t Js.optdef Js.prop - method second : Js.js_string Js.t Js.optdef Js.prop + method second : Js.js_string Js.t Js.optdef Js.prop - method fractionalSecondDigits : int Js.optdef Js.prop + method fractionalSecondDigits : int Js.optdef Js.prop - method timeZoneName : Js.js_string Js.t Js.optdef Js.prop - end + method timeZoneName : Js.js_string Js.t Js.optdef Js.prop + end val options : unit -> options Js.t - class type format_part = - object - method _type : Js.js_string Js.t Js.readonly_prop + class type format_part = object + method _type : Js.js_string Js.t Js.readonly_prop - method _value : Js.js_string Js.t Js.readonly_prop - end + method _value : Js.js_string Js.t Js.readonly_prop + end - class type t = - object - method format : (Js.date Js.t -> Js.js_string Js.t) Js.readonly_prop + class type t = object + method format : (Js.date Js.t -> Js.js_string Js.t) Js.readonly_prop - method formatToParts : - Js.date Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth + method formatToParts : + Js.date Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module NumberFormat : sig include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method numberingSystem : Js.js_string Js.t Js.readonly_prop + method numberingSystem : Js.js_string Js.t Js.readonly_prop - method style : Js.js_string Js.t Js.readonly_prop + method style : Js.js_string Js.t Js.readonly_prop - method currency : Js.js_string Js.t Js.optdef_prop + method currency : Js.js_string Js.t Js.optdef_prop - method currencyDisplay : Js.js_string Js.t Js.optdef_prop + method currencyDisplay : Js.js_string Js.t Js.optdef_prop - method useGrouping : bool Js.t Js.readonly_prop + method useGrouping : bool Js.t Js.readonly_prop - method minimumIntegerDigits : int Js.optdef_prop + method minimumIntegerDigits : int Js.optdef_prop - method minimumFractionDigits : int Js.optdef_prop + method minimumFractionDigits : int Js.optdef_prop - method maximumFractionDigits : int Js.optdef_prop + method maximumFractionDigits : int Js.optdef_prop - method minimumSignificantDigits : int Js.optdef_prop + method minimumSignificantDigits : int Js.optdef_prop - method maximumSignificantDigits : int Js.optdef_prop - end + method maximumSignificantDigits : int Js.optdef_prop + end - class type options = - object - method compactDisplay : Js.js_string Js.t Js.optdef Js.prop + class type options = object + method compactDisplay : Js.js_string Js.t Js.optdef Js.prop - method currency : Js.js_string Js.t Js.optdef Js.prop + method currency : Js.js_string Js.t Js.optdef Js.prop - method currencyDisplay : Js.js_string Js.t Js.optdef Js.prop + method currencyDisplay : Js.js_string Js.t Js.optdef Js.prop - method currencySign : Js.js_string Js.t Js.optdef Js.prop + method currencySign : Js.js_string Js.t Js.optdef Js.prop - method localeMatcher : Js.js_string Js.t Js.prop + method localeMatcher : Js.js_string Js.t Js.prop - method notation : Js.js_string Js.t Js.optdef Js.prop + method notation : Js.js_string Js.t Js.optdef Js.prop - method numberingSystem : Js.js_string Js.t Js.optdef Js.prop + method numberingSystem : Js.js_string Js.t Js.optdef Js.prop - method signDisplay : Js.js_string Js.t Js.optdef Js.prop + method signDisplay : Js.js_string Js.t Js.optdef Js.prop - method style : Js.js_string Js.t Js.prop + method style : Js.js_string Js.t Js.prop - method unit : Js.js_string Js.t Js.optdef Js.prop + method unit : Js.js_string Js.t Js.optdef Js.prop - method unitDisplay : Js.js_string Js.t Js.optdef Js.prop + method unitDisplay : Js.js_string Js.t Js.optdef Js.prop - method useGrouping : bool Js.t Js.prop + method useGrouping : bool Js.t Js.prop - method roundingMode : Js.js_string Js.t Js.optdef Js.prop + method roundingMode : Js.js_string Js.t Js.optdef Js.prop - method roundingPriority : Js.js_string Js.t Js.optdef Js.prop + method roundingPriority : Js.js_string Js.t Js.optdef Js.prop - method roundingIncrement : Js.js_string Js.t Js.optdef Js.prop + method roundingIncrement : Js.js_string Js.t Js.optdef Js.prop - method trailingZeroDisplay : Js.js_string Js.t Js.optdef Js.prop + method trailingZeroDisplay : Js.js_string Js.t Js.optdef Js.prop - method minimumIntegerDigits : int Js.optdef Js.prop + method minimumIntegerDigits : int Js.optdef Js.prop - method minimumFractionDigits : int Js.optdef Js.prop + method minimumFractionDigits : int Js.optdef Js.prop - method maximumFractionDigits : int Js.optdef Js.prop + method maximumFractionDigits : int Js.optdef Js.prop - method minimumSignificantDigits : int Js.optdef Js.prop + method minimumSignificantDigits : int Js.optdef Js.prop - method maximumSignificantDigits : int Js.optdef Js.prop - end + method maximumSignificantDigits : int Js.optdef Js.prop + end val options : unit -> options Js.t - class type format_part = - object - method _type : Js.js_string Js.t Js.readonly_prop + class type format_part = object + method _type : Js.js_string Js.t Js.readonly_prop - method _value : Js.js_string Js.t Js.readonly_prop - end + method _value : Js.js_string Js.t Js.readonly_prop + end - class type t = - object - method format : (Js.number Js.t -> Js.js_string Js.t) Js.readonly_prop + class type t = object + method format : (Js.number Js.t -> Js.js_string Js.t) Js.readonly_prop - method formatToParts : - Js.number Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth + method formatToParts : + Js.number Js.t Js.optdef -> format_part Js.t Js.js_array Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end module PluralRules : sig include Shared - class type resolved_options = - object - method locale : Js.js_string Js.t Js.readonly_prop + class type resolved_options = object + method locale : Js.js_string Js.t Js.readonly_prop - method pluralCategories : Js.js_string Js.t Js.js_array Js.t Js.readonly_prop + method pluralCategories : Js.js_string Js.t Js.js_array Js.t Js.readonly_prop - method _type : Js.js_string Js.t Js.readonly_prop + method _type : Js.js_string Js.t Js.readonly_prop - method minimumIntegerDigits : int Js.optdef_prop + method minimumIntegerDigits : int Js.optdef_prop - method minimumFractionDigits : int Js.optdef_prop + method minimumFractionDigits : int Js.optdef_prop - method maximumFractionDigits : int Js.optdef_prop + method maximumFractionDigits : int Js.optdef_prop - method minimumSignificantDigits : int Js.optdef_prop + method minimumSignificantDigits : int Js.optdef_prop - method maximumSignificantDigits : int Js.optdef_prop - end + method maximumSignificantDigits : int Js.optdef_prop + end - class type options = - object - method localeMatcher : Js.js_string Js.t Js.prop + class type options = object + method localeMatcher : Js.js_string Js.t Js.prop - method _type : Js.js_string Js.t Js.prop - end + method _type : Js.js_string Js.t Js.prop + end val options : unit -> options Js.t - class type t = - object - method select : Js.number Js.t -> Js.js_string Js.t Js.meth + class type t = object + method select : Js.number Js.t -> Js.js_string Js.t Js.meth - method resolvedOptions : unit -> resolved_options Js.t Js.meth - end + method resolvedOptions : unit -> resolved_options Js.t Js.meth + end end -class type intl = - object - method _Collator : Collator._object Js.t Js.readonly_prop +class type intl = object + method _Collator : Collator._object Js.t Js.readonly_prop - method _DateTimeFormat : DateTimeFormat._object Js.t Js.readonly_prop + method _DateTimeFormat : DateTimeFormat._object Js.t Js.readonly_prop - method _NumberFormat : NumberFormat._object Js.t Js.readonly_prop + method _NumberFormat : NumberFormat._object Js.t Js.readonly_prop - method _PluralRules : PluralRules._object Js.t Js.readonly_prop + method _PluralRules : PluralRules._object Js.t Js.readonly_prop - method getCanonicalLocales : - Js.js_string Js.t Js.js_array Js.t -> Js.js_string Js.t Js.js_array Js.t Js.meth - end + method getCanonicalLocales : + Js.js_string Js.t Js.js_array Js.t -> Js.js_string Js.t Js.js_array Js.t Js.meth +end val intl : intl Js.t diff --git a/lib/js_of_ocaml/js.ml b/lib/js_of_ocaml/js.ml index 64fbab90dd..8cee85236c 100644 --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -226,95 +226,93 @@ module Js = struct type string_array - class type js_string = - object - method toString : js_string t meth + class type js_string = object + method toString : js_string t meth - method valueOf : js_string t meth + method valueOf : js_string t meth - method charAt : int -> js_string t meth + method charAt : int -> js_string t meth - method charCodeAt : int -> float meth + method charCodeAt : int -> float meth - (* This may return NaN... *) - method concat : js_string t -> js_string t meth + (* This may return NaN... *) + method concat : js_string t -> js_string t meth - method concat_2 : js_string t -> js_string t -> js_string t meth + method concat_2 : js_string t -> js_string t -> js_string t meth - method concat_3 : js_string t -> js_string t -> js_string t -> js_string t meth + method concat_3 : js_string t -> js_string t -> js_string t -> js_string t meth - method concat_4 : - js_string t -> js_string t -> js_string t -> js_string t -> js_string t meth + method concat_4 : + js_string t -> js_string t -> js_string t -> js_string t -> js_string t meth - method indexOf : js_string t -> int meth + method indexOf : js_string t -> int meth - method indexOf_from : js_string t -> int -> int meth + method indexOf_from : js_string t -> int -> int meth - method lastIndexOf : js_string t -> int meth + method lastIndexOf : js_string t -> int meth - method lastIndexOf_from : js_string t -> int -> int meth + method lastIndexOf_from : js_string t -> int -> int meth - method localeCompare : js_string t -> float meth + method localeCompare : js_string t -> float meth - method _match : regExp t -> match_result_handle t opt meth + method _match : regExp t -> match_result_handle t opt meth - method normalize : js_string t meth + method normalize : js_string t meth - method normalize_form : normalization t -> js_string t meth + method normalize_form : normalization t -> js_string t meth - method replace : regExp t -> js_string t -> js_string t meth + method replace : regExp t -> js_string t -> js_string t meth - method replace_string : js_string t -> js_string t -> js_string t meth + method replace_string : js_string t -> js_string t -> js_string t meth - method search : regExp t -> int meth + method search : regExp t -> int meth - method slice : int -> int -> js_string t meth + method slice : int -> int -> js_string t meth - method slice_end : int -> js_string t meth + method slice_end : int -> js_string t meth - method split : js_string t -> string_array t meth + method split : js_string t -> string_array t meth - method split_limited : js_string t -> int -> string_array t meth + method split_limited : js_string t -> int -> string_array t meth - method split_regExp : regExp t -> string_array t meth + method split_regExp : regExp t -> string_array t meth - method split_regExpLimited : regExp t -> int -> string_array t meth + method split_regExpLimited : regExp t -> int -> string_array t meth - method substring : int -> int -> js_string t meth + method substring : int -> int -> js_string t meth - method substring_toEnd : int -> js_string t meth + method substring_toEnd : int -> js_string t meth - method toLowerCase : js_string t meth + method toLowerCase : js_string t meth - method toLocaleLowerCase : js_string t meth + method toLocaleLowerCase : js_string t meth - method toUpperCase : js_string t meth + method toUpperCase : js_string t meth - method toLocaleUpperCase : js_string t meth + method toLocaleUpperCase : js_string t meth - method trim : js_string t meth + method trim : js_string t meth - method length : int readonly_prop - end + method length : int readonly_prop + end - and regExp = - object - method exec : js_string t -> match_result_handle t opt meth + and regExp = object + method exec : js_string t -> match_result_handle t opt meth - method test : js_string t -> bool t meth + method test : js_string t -> bool t meth - method toString : js_string t meth + method toString : js_string t meth - method source : js_string t readonly_prop + method source : js_string t readonly_prop - method global : bool t readonly_prop + method global : bool t readonly_prop - method ignoreCase : bool t readonly_prop + method ignoreCase : bool t readonly_prop - method multiline : bool t readonly_prop + method multiline : bool t readonly_prop - method lastIndex : int prop - end + method lastIndex : int prop + end and normalization = js_string @@ -335,10 +333,9 @@ end include Js -class type string_constr = - object - method fromCharCode : int -> js_string t meth - end +class type string_constr = object + method fromCharCode : int -> js_string t meth +end let string_constr = Unsafe.global##._String @@ -348,78 +345,76 @@ let regExp_copy = regExp let regExp_withFlags = regExp -class type ['a] js_array = - object - method toString : js_string t meth +class type ['a] js_array = object + method toString : js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method concat : 'a js_array t -> 'a js_array t meth + method concat : 'a js_array t -> 'a js_array t meth - method join : js_string t -> js_string t meth + method join : js_string t -> js_string t meth - method pop : 'a optdef meth + method pop : 'a optdef meth - method push : 'a -> int meth + method push : 'a -> int meth - method push_2 : 'a -> 'a -> int meth + method push_2 : 'a -> 'a -> int meth - method push_3 : 'a -> 'a -> 'a -> int meth + method push_3 : 'a -> 'a -> 'a -> int meth - method push_4 : 'a -> 'a -> 'a -> 'a -> int meth + method push_4 : 'a -> 'a -> 'a -> 'a -> int meth - method reverse : 'a js_array t meth + method reverse : 'a js_array t meth - method shift : 'a optdef meth + method shift : 'a optdef meth - method slice : int -> int -> 'a js_array t meth + method slice : int -> int -> 'a js_array t meth - method slice_end : int -> 'a js_array t meth + method slice_end : int -> 'a js_array t meth - method sort : ('a -> 'a -> float) callback -> 'a js_array t meth + method sort : ('a -> 'a -> float) callback -> 'a js_array t meth - method sort_asStrings : 'a js_array t meth + method sort_asStrings : 'a js_array t meth - method splice : int -> int -> 'a js_array t meth + method splice : int -> int -> 'a js_array t meth - method splice_1 : int -> int -> 'a -> 'a js_array t meth + method splice_1 : int -> int -> 'a -> 'a js_array t meth - method splice_2 : int -> int -> 'a -> 'a -> 'a js_array t meth + method splice_2 : int -> int -> 'a -> 'a -> 'a js_array t meth - method splice_3 : int -> int -> 'a -> 'a -> 'a -> 'a js_array t meth + method splice_3 : int -> int -> 'a -> 'a -> 'a -> 'a js_array t meth - method splice_4 : int -> int -> 'a -> 'a -> 'a -> 'a -> 'a js_array t meth + method splice_4 : int -> int -> 'a -> 'a -> 'a -> 'a -> 'a js_array t meth - method unshift : 'a -> int meth + method unshift : 'a -> int meth - method unshift_2 : 'a -> 'a -> int meth + method unshift_2 : 'a -> 'a -> int meth - method unshift_3 : 'a -> 'a -> 'a -> int meth + method unshift_3 : 'a -> 'a -> 'a -> int meth - method unshift_4 : 'a -> 'a -> 'a -> 'a -> int meth + method unshift_4 : 'a -> 'a -> 'a -> 'a -> int meth - method some : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth + method some : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth - method every : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth + method every : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth - method forEach : ('a -> int -> 'a js_array t -> unit) callback -> unit meth + method forEach : ('a -> int -> 'a js_array t -> unit) callback -> unit meth - method map : ('a -> int -> 'a js_array t -> 'b) callback -> 'b js_array t meth + method map : ('a -> int -> 'a js_array t -> 'b) callback -> 'b js_array t meth - method filter : ('a -> int -> 'a js_array t -> bool t) callback -> 'a js_array t meth + method filter : ('a -> int -> 'a js_array t -> bool t) callback -> 'a js_array t meth - method reduce_init : - ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth + method reduce_init : ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth - method reduce : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth + method reduce : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth - method reduceRight_init : - ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth + method reduceRight_init : + ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth - method reduceRight : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth + method reduceRight : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth - method length : int prop - end + method length : int prop +end let object_constructor = Unsafe.global##._Object @@ -443,151 +438,147 @@ let array_map f a = array_map_poly a (wrap_callback (fun x _idx _ -> f x)) let array_mapi f a = array_map_poly a (wrap_callback (fun x idx _ -> f idx x)) -class type match_result = - object - inherit [js_string t] js_array +class type match_result = object + inherit [js_string t] js_array - method index : int readonly_prop + method index : int readonly_prop - method input : js_string t readonly_prop - end + method input : js_string t readonly_prop +end let str_array : string_array t -> js_string t js_array t = Unsafe.coerce let match_result : match_result_handle t -> match_result t = Unsafe.coerce -class type number = - object - method toString : js_string t meth +class type number = object + method toString : js_string t meth - method toString_radix : int -> js_string t meth + method toString_radix : int -> js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method toFixed : int -> js_string t meth + method toFixed : int -> js_string t meth - method toExponential : js_string t meth + method toExponential : js_string t meth - method toExponential_digits : int -> js_string t meth + method toExponential_digits : int -> js_string t meth - method toPrecision : int -> js_string t meth - end + method toPrecision : int -> js_string t meth +end external number_of_float : float -> number t = "caml_js_from_float" external float_of_number : number t -> float = "caml_js_to_float" -class type date = - object - method toString : js_string t meth +class type date = object + method toString : js_string t meth - method toDateString : js_string t meth + method toDateString : js_string t meth - method toTimeString : js_string t meth + method toTimeString : js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method toLocaleDateString : js_string t meth + method toLocaleDateString : js_string t meth - method toLocaleTimeString : js_string t meth + method toLocaleTimeString : js_string t meth - method valueOf : float meth + method valueOf : float meth - method getTime : float meth + method getTime : float meth - method getFullYear : int meth + method getFullYear : int meth - method getUTCFullYear : int meth + method getUTCFullYear : int meth - method getMonth : int meth + method getMonth : int meth - method getUTCMonth : int meth + method getUTCMonth : int meth - method getDate : int meth + method getDate : int meth - method getUTCDate : int meth + method getUTCDate : int meth - method getDay : int meth + method getDay : int meth - method getUTCDay : int meth + method getUTCDay : int meth - method getHours : int meth + method getHours : int meth - method getUTCHours : int meth + method getUTCHours : int meth - method getMinutes : int meth + method getMinutes : int meth - method getUTCMinutes : int meth + method getUTCMinutes : int meth - method getSeconds : int meth + method getSeconds : int meth - method getUTCSeconds : int meth + method getUTCSeconds : int meth - method getMilliseconds : int meth + method getMilliseconds : int meth - method getUTCMilliseconds : int meth + method getUTCMilliseconds : int meth - method getTimezoneOffset : int meth + method getTimezoneOffset : int meth - method setTime : float -> float meth + method setTime : float -> float meth - method setFullYear : int -> float meth + method setFullYear : int -> float meth - method setUTCFullYear : int -> float meth + method setUTCFullYear : int -> float meth - method setMonth : int -> float meth + method setMonth : int -> float meth - method setUTCMonth : int -> float meth + method setUTCMonth : int -> float meth - method setDate : int -> float meth + method setDate : int -> float meth - method setUTCDate : int -> float meth + method setUTCDate : int -> float meth - method setDay : int -> float meth + method setDay : int -> float meth - method setUTCDay : int -> float meth + method setUTCDay : int -> float meth - method setHours : int -> float meth + method setHours : int -> float meth - method setUTCHours : int -> float meth + method setUTCHours : int -> float meth - method setMinutes : int -> float meth + method setMinutes : int -> float meth - method setUTCMinutes : int -> float meth + method setUTCMinutes : int -> float meth - method setSeconds : int -> float meth + method setSeconds : int -> float meth - method setUTCSeconds : int -> float meth + method setUTCSeconds : int -> float meth - method setMilliseconds : int -> float meth + method setMilliseconds : int -> float meth - method setUTCMilliseconds : int -> float meth + method setUTCMilliseconds : int -> float meth - method toUTCString : js_string t meth + method toUTCString : js_string t meth - method toISOString : js_string t meth + method toISOString : js_string t meth - method toJSON : 'a -> js_string t meth - end + method toJSON : 'a -> js_string t meth +end -class type date_constr = - object - method parse : js_string t -> float meth +class type date_constr = object + method parse : js_string t -> float meth - method _UTC_month : int -> int -> float meth + method _UTC_month : int -> int -> float meth - method _UTC_day : int -> int -> float meth + method _UTC_day : int -> int -> float meth - method _UTC_hour : int -> int -> int -> int -> float meth + method _UTC_hour : int -> int -> int -> int -> float meth - method _UTC_min : int -> int -> int -> int -> int -> float meth + method _UTC_min : int -> int -> int -> int -> int -> float meth - method _UTC_sec : int -> int -> int -> int -> int -> int -> float meth + method _UTC_sec : int -> int -> int -> int -> int -> int -> float meth - method _UTC_ms : int -> int -> int -> int -> int -> int -> int -> float meth + method _UTC_ms : int -> int -> int -> int -> int -> int -> int -> float meth - method now : float meth - end + method now : float meth +end let date_constr = Unsafe.global##._Date @@ -610,81 +601,79 @@ let date_sec : (int -> int -> int -> int -> int -> int -> date t) constr = date_ let date_ms : (int -> int -> int -> int -> int -> int -> int -> date t) constr = date_constr -class type math = - object - method _E : float readonly_prop +class type math = object + method _E : float readonly_prop - method _LN2 : float readonly_prop + method _LN2 : float readonly_prop - method _LN10 : float readonly_prop + method _LN10 : float readonly_prop - method _LOG2E : float readonly_prop + method _LOG2E : float readonly_prop - method _LOG10E : float readonly_prop + method _LOG10E : float readonly_prop - method _PI : float readonly_prop + method _PI : float readonly_prop - method _SQRT1_2_ : float readonly_prop + method _SQRT1_2_ : float readonly_prop - method _SQRT2 : float readonly_prop + method _SQRT2 : float readonly_prop - method abs : float -> float meth + method abs : float -> float meth - method acos : float -> float meth + method acos : float -> float meth - method asin : float -> float meth + method asin : float -> float meth - method atan : float -> float meth + method atan : float -> float meth - method atan2 : float -> float -> float meth + method atan2 : float -> float -> float meth - method ceil : float -> float meth + method ceil : float -> float meth - method cos : float -> float meth + method cos : float -> float meth - method exp : float -> float meth + method exp : float -> float meth - method floor : float -> float meth + method floor : float -> float meth - method log : float -> float meth + method log : float -> float meth - method max : float -> float -> float meth + method max : float -> float -> float meth - method max_3 : float -> float -> float -> float meth + method max_3 : float -> float -> float -> float meth - method max_4 : float -> float -> float -> float -> float meth + method max_4 : float -> float -> float -> float -> float meth - method min : float -> float -> float meth + method min : float -> float -> float meth - method min_3 : float -> float -> float -> float meth + method min_3 : float -> float -> float -> float meth - method min_4 : float -> float -> float -> float -> float meth + method min_4 : float -> float -> float -> float -> float meth - method pow : float -> float -> float meth + method pow : float -> float -> float meth - method random : float meth + method random : float meth - method round : float -> float meth + method round : float -> float meth - method sin : float -> float meth + method sin : float -> float meth - method sqrt : float -> float meth + method sqrt : float -> float meth - method tan : float -> float meth - end + method tan : float -> float meth +end let math = Unsafe.global##._Math -class type error = - object - method name : js_string t prop +class type error = object + method name : js_string t prop - method message : js_string t prop + method message : js_string t prop - method stack : js_string t optdef prop + method stack : js_string t optdef prop - method toString : js_string t meth - end + method toString : js_string t meth +end let error_constr = Unsafe.global##._Error @@ -736,12 +725,11 @@ let exn_with_js_backtrace = Js_error.attach_js_backtrace external js_error_of_exn : exn -> error t opt = "caml_js_error_of_exception" -class type json = - object - method parse : js_string t -> 'a meth +class type json = object + method parse : js_string t -> 'a meth - method stringify : 'a -> js_string t meth - end + method stringify : 'a -> js_string t meth +end let _JSON : json t = Unsafe.global##._JSON diff --git a/lib/js_of_ocaml/js.mli b/lib/js_of_ocaml/js.mli index e55dc77883..fcc1ce6248 100644 --- a/lib/js_of_ocaml/js.mli +++ b/lib/js_of_ocaml/js.mli @@ -204,103 +204,100 @@ val nfkc : normalization t (** Compatibility Decomposition, followed by Canonical Composition *) (** Specification of Javascript string objects. *) -class type js_string = - object - method toString : js_string t meth +class type js_string = object + method toString : js_string t meth - method valueOf : js_string t meth + method valueOf : js_string t meth - method charAt : int -> js_string t meth + method charAt : int -> js_string t meth - method charCodeAt : int -> float meth + method charCodeAt : int -> float meth - (* This may return NaN... *) - method concat : js_string t -> js_string t meth + (* This may return NaN... *) + method concat : js_string t -> js_string t meth - method concat_2 : js_string t -> js_string t -> js_string t meth + method concat_2 : js_string t -> js_string t -> js_string t meth - method concat_3 : js_string t -> js_string t -> js_string t -> js_string t meth + method concat_3 : js_string t -> js_string t -> js_string t -> js_string t meth - method concat_4 : - js_string t -> js_string t -> js_string t -> js_string t -> js_string t meth + method concat_4 : + js_string t -> js_string t -> js_string t -> js_string t -> js_string t meth - method indexOf : js_string t -> int meth + method indexOf : js_string t -> int meth - method indexOf_from : js_string t -> int -> int meth + method indexOf_from : js_string t -> int -> int meth - method lastIndexOf : js_string t -> int meth + method lastIndexOf : js_string t -> int meth - method lastIndexOf_from : js_string t -> int -> int meth + method lastIndexOf_from : js_string t -> int -> int meth - method localeCompare : js_string t -> float meth + method localeCompare : js_string t -> float meth - method _match : regExp t -> match_result_handle t opt meth + method _match : regExp t -> match_result_handle t opt meth - method normalize : js_string t meth + method normalize : js_string t meth - method normalize_form : normalization t -> js_string t meth + method normalize_form : normalization t -> js_string t meth - method replace : regExp t -> js_string t -> js_string t meth + method replace : regExp t -> js_string t -> js_string t meth - (* FIX: version of replace taking a function... *) - method replace_string : js_string t -> js_string t -> js_string t meth + (* FIX: version of replace taking a function... *) + method replace_string : js_string t -> js_string t -> js_string t meth - method search : regExp t -> int meth + method search : regExp t -> int meth - method slice : int -> int -> js_string t meth + method slice : int -> int -> js_string t meth - method slice_end : int -> js_string t meth + method slice_end : int -> js_string t meth - method split : js_string t -> string_array t meth + method split : js_string t -> string_array t meth - method split_limited : js_string t -> int -> string_array t meth + method split_limited : js_string t -> int -> string_array t meth - method split_regExp : regExp t -> string_array t meth + method split_regExp : regExp t -> string_array t meth - method split_regExpLimited : regExp t -> int -> string_array t meth + method split_regExpLimited : regExp t -> int -> string_array t meth - method substring : int -> int -> js_string t meth + method substring : int -> int -> js_string t meth - method substring_toEnd : int -> js_string t meth + method substring_toEnd : int -> js_string t meth - method toLowerCase : js_string t meth + method toLowerCase : js_string t meth - method toLocaleLowerCase : js_string t meth + method toLocaleLowerCase : js_string t meth - method toUpperCase : js_string t meth + method toUpperCase : js_string t meth - method toLocaleUpperCase : js_string t meth + method toLocaleUpperCase : js_string t meth - method trim : js_string t meth + method trim : js_string t meth - method length : int readonly_prop - end + method length : int readonly_prop +end (** Specification of Javascript regular expression objects. *) -and regExp = - object - method exec : js_string t -> match_result_handle t opt meth +and regExp = object + method exec : js_string t -> match_result_handle t opt meth - method test : js_string t -> bool t meth + method test : js_string t -> bool t meth - method toString : js_string t meth + method toString : js_string t meth - method source : js_string t readonly_prop + method source : js_string t readonly_prop - method global : bool t readonly_prop + method global : bool t readonly_prop - method ignoreCase : bool t readonly_prop + method ignoreCase : bool t readonly_prop - method multiline : bool t readonly_prop + method multiline : bool t readonly_prop - method lastIndex : int prop - end + method lastIndex : int prop +end (** Specification of the string constructor, considered as an object. *) -class type string_constr = - object - method fromCharCode : int -> js_string t meth - end +class type string_constr = object + method fromCharCode : int -> js_string t meth +end val string_constr : string_constr t (** The string constructor, as an object. *) @@ -320,78 +317,76 @@ val regExp_copy : (regExp t -> regExp t) constr (** Specification of Javascript regular arrays. Use [Js.array_get] and [Js.array_set] to access and set array elements. *) -class type ['a] js_array = - object - method toString : js_string t meth +class type ['a] js_array = object + method toString : js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method concat : 'a js_array t -> 'a js_array t meth + method concat : 'a js_array t -> 'a js_array t meth - method join : js_string t -> js_string t meth + method join : js_string t -> js_string t meth - method pop : 'a optdef meth + method pop : 'a optdef meth - method push : 'a -> int meth + method push : 'a -> int meth - method push_2 : 'a -> 'a -> int meth + method push_2 : 'a -> 'a -> int meth - method push_3 : 'a -> 'a -> 'a -> int meth + method push_3 : 'a -> 'a -> 'a -> int meth - method push_4 : 'a -> 'a -> 'a -> 'a -> int meth + method push_4 : 'a -> 'a -> 'a -> 'a -> int meth - method reverse : 'a js_array t meth + method reverse : 'a js_array t meth - method shift : 'a optdef meth + method shift : 'a optdef meth - method slice : int -> int -> 'a js_array t meth + method slice : int -> int -> 'a js_array t meth - method slice_end : int -> 'a js_array t meth + method slice_end : int -> 'a js_array t meth - method sort : ('a -> 'a -> float) callback -> 'a js_array t meth + method sort : ('a -> 'a -> float) callback -> 'a js_array t meth - method sort_asStrings : 'a js_array t meth + method sort_asStrings : 'a js_array t meth - method splice : int -> int -> 'a js_array t meth + method splice : int -> int -> 'a js_array t meth - method splice_1 : int -> int -> 'a -> 'a js_array t meth + method splice_1 : int -> int -> 'a -> 'a js_array t meth - method splice_2 : int -> int -> 'a -> 'a -> 'a js_array t meth + method splice_2 : int -> int -> 'a -> 'a -> 'a js_array t meth - method splice_3 : int -> int -> 'a -> 'a -> 'a -> 'a js_array t meth + method splice_3 : int -> int -> 'a -> 'a -> 'a -> 'a js_array t meth - method splice_4 : int -> int -> 'a -> 'a -> 'a -> 'a -> 'a js_array t meth + method splice_4 : int -> int -> 'a -> 'a -> 'a -> 'a -> 'a js_array t meth - method unshift : 'a -> int meth + method unshift : 'a -> int meth - method unshift_2 : 'a -> 'a -> int meth + method unshift_2 : 'a -> 'a -> int meth - method unshift_3 : 'a -> 'a -> 'a -> int meth + method unshift_3 : 'a -> 'a -> 'a -> int meth - method unshift_4 : 'a -> 'a -> 'a -> 'a -> int meth + method unshift_4 : 'a -> 'a -> 'a -> 'a -> int meth - method some : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth + method some : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth - method every : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth + method every : ('a -> int -> 'a js_array t -> bool t) callback -> bool t meth - method forEach : ('a -> int -> 'a js_array t -> unit) callback -> unit meth + method forEach : ('a -> int -> 'a js_array t -> unit) callback -> unit meth - method map : ('a -> int -> 'a js_array t -> 'b) callback -> 'b js_array t meth + method map : ('a -> int -> 'a js_array t -> 'b) callback -> 'b js_array t meth - method filter : ('a -> int -> 'a js_array t -> bool t) callback -> 'a js_array t meth + method filter : ('a -> int -> 'a js_array t -> bool t) callback -> 'a js_array t meth - method reduce_init : - ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth + method reduce_init : ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth - method reduce : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth + method reduce : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth - method reduceRight_init : - ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth + method reduceRight_init : + ('b -> 'a -> int -> 'a js_array t -> 'b) callback -> 'b -> 'b meth - method reduceRight : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth + method reduceRight : ('a -> 'a -> int -> 'a js_array t -> 'a) callback -> 'a meth - method length : int prop - end + method length : int prop +end val object_keys : 'a t -> js_string t js_array t (** Returns jsarray containing keys of the object as Object.keys does. *) @@ -420,14 +415,13 @@ val array_mapi : (int -> 'a -> 'b) -> 'a #js_array t -> 'b #js_array t (** Array mapi: [array_mapi f a] is [a##map(wrap_callback (fun elt idx arr -> f idx elt))]. *) (** Specification of match result objects *) -class type match_result = - object - inherit [js_string t] js_array +class type match_result = object + inherit [js_string t] js_array - method index : int readonly_prop + method index : int readonly_prop - method input : js_string t readonly_prop - end + method input : js_string t readonly_prop +end val str_array : string_array t -> js_string t js_array t (** Convert an opaque [string_array t] object into an array of @@ -440,22 +434,21 @@ val match_result : match_result_handle t -> match_result t and array type definitions.) *) (** Specification of Javascript number objects. *) -class type number = - object - method toString : js_string t meth +class type number = object + method toString : js_string t meth - method toString_radix : int -> js_string t meth + method toString_radix : int -> js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method toFixed : int -> js_string t meth + method toFixed : int -> js_string t meth - method toExponential : js_string t meth + method toExponential : js_string t meth - method toExponential_digits : int -> js_string t meth + method toExponential_digits : int -> js_string t meth - method toPrecision : int -> js_string t meth - end + method toPrecision : int -> js_string t meth +end external number_of_float : float -> number t = "caml_js_from_float" (** Conversion of OCaml floats to Javascript number objects. *) @@ -464,98 +457,97 @@ external float_of_number : number t -> float = "caml_js_to_float" (** Conversion of Javascript number objects to OCaml floats. *) (** Specification of Javascript date objects. *) -class type date = - object - method toString : js_string t meth +class type date = object + method toString : js_string t meth - method toDateString : js_string t meth + method toDateString : js_string t meth - method toTimeString : js_string t meth + method toTimeString : js_string t meth - method toLocaleString : js_string t meth + method toLocaleString : js_string t meth - method toLocaleDateString : js_string t meth + method toLocaleDateString : js_string t meth - method toLocaleTimeString : js_string t meth + method toLocaleTimeString : js_string t meth - method valueOf : float meth + method valueOf : float meth - method getTime : float meth + method getTime : float meth - method getFullYear : int meth + method getFullYear : int meth - method getUTCFullYear : int meth + method getUTCFullYear : int meth - method getMonth : int meth + method getMonth : int meth - method getUTCMonth : int meth + method getUTCMonth : int meth - method getDate : int meth + method getDate : int meth - method getUTCDate : int meth + method getUTCDate : int meth - method getDay : int meth + method getDay : int meth - method getUTCDay : int meth + method getUTCDay : int meth - method getHours : int meth + method getHours : int meth - method getUTCHours : int meth + method getUTCHours : int meth - method getMinutes : int meth + method getMinutes : int meth - method getUTCMinutes : int meth + method getUTCMinutes : int meth - method getSeconds : int meth + method getSeconds : int meth - method getUTCSeconds : int meth + method getUTCSeconds : int meth - method getMilliseconds : int meth + method getMilliseconds : int meth - method getUTCMilliseconds : int meth + method getUTCMilliseconds : int meth - method getTimezoneOffset : int meth + method getTimezoneOffset : int meth - method setTime : float -> float meth + method setTime : float -> float meth - method setFullYear : int -> float meth + method setFullYear : int -> float meth - method setUTCFullYear : int -> float meth + method setUTCFullYear : int -> float meth - method setMonth : int -> float meth + method setMonth : int -> float meth - method setUTCMonth : int -> float meth + method setUTCMonth : int -> float meth - method setDate : int -> float meth + method setDate : int -> float meth - method setUTCDate : int -> float meth + method setUTCDate : int -> float meth - method setDay : int -> float meth + method setDay : int -> float meth - method setUTCDay : int -> float meth + method setUTCDay : int -> float meth - method setHours : int -> float meth + method setHours : int -> float meth - method setUTCHours : int -> float meth + method setUTCHours : int -> float meth - method setMinutes : int -> float meth + method setMinutes : int -> float meth - method setUTCMinutes : int -> float meth + method setUTCMinutes : int -> float meth - method setSeconds : int -> float meth + method setSeconds : int -> float meth - method setUTCSeconds : int -> float meth + method setUTCSeconds : int -> float meth - method setMilliseconds : int -> float meth + method setMilliseconds : int -> float meth - method setUTCMilliseconds : int -> float meth + method setUTCMilliseconds : int -> float meth - method toUTCString : js_string t meth + method toUTCString : js_string t meth - method toISOString : js_string t meth + method toISOString : js_string t meth - method toJSON : 'a -> js_string t meth - end + method toJSON : 'a -> js_string t meth +end val date_now : date t constr (** Constructor of [Date] objects: [new%js date_now] returns a @@ -594,106 +586,103 @@ val date_ms : (int -> int -> int -> int -> int -> int -> int -> date t) constr to millisecond [ms]. *) (** Specification of the date constructor, considered as an object. *) -class type date_constr = - object - method parse : js_string t -> float meth +class type date_constr = object + method parse : js_string t -> float meth - method _UTC_month : int -> int -> float meth + method _UTC_month : int -> int -> float meth - method _UTC_day : int -> int -> float meth + method _UTC_day : int -> int -> float meth - method _UTC_hour : int -> int -> int -> int -> float meth + method _UTC_hour : int -> int -> int -> int -> float meth - method _UTC_min : int -> int -> int -> int -> int -> float meth + method _UTC_min : int -> int -> int -> int -> int -> float meth - method _UTC_sec : int -> int -> int -> int -> int -> int -> float meth + method _UTC_sec : int -> int -> int -> int -> int -> int -> float meth - method _UTC_ms : int -> int -> int -> int -> int -> int -> int -> float meth + method _UTC_ms : int -> int -> int -> int -> int -> int -> int -> float meth - method now : float meth - end + method now : float meth +end val date : date_constr t (** The date constructor, as an object. *) (** Specification of Javascript math object. *) -class type math = - object - method _E : float readonly_prop +class type math = object + method _E : float readonly_prop - method _LN2 : float readonly_prop + method _LN2 : float readonly_prop - method _LN10 : float readonly_prop + method _LN10 : float readonly_prop - method _LOG2E : float readonly_prop + method _LOG2E : float readonly_prop - method _LOG10E : float readonly_prop + method _LOG10E : float readonly_prop - method _PI : float readonly_prop + method _PI : float readonly_prop - method _SQRT1_2_ : float readonly_prop + method _SQRT1_2_ : float readonly_prop - method _SQRT2 : float readonly_prop + method _SQRT2 : float readonly_prop - method abs : float -> float meth + method abs : float -> float meth - method acos : float -> float meth + method acos : float -> float meth - method asin : float -> float meth + method asin : float -> float meth - method atan : float -> float meth + method atan : float -> float meth - method atan2 : float -> float -> float meth + method atan2 : float -> float -> float meth - method ceil : float -> float meth + method ceil : float -> float meth - method cos : float -> float meth + method cos : float -> float meth - method exp : float -> float meth + method exp : float -> float meth - method floor : float -> float meth + method floor : float -> float meth - method log : float -> float meth + method log : float -> float meth - method max : float -> float -> float meth + method max : float -> float -> float meth - method max_3 : float -> float -> float -> float meth + method max_3 : float -> float -> float -> float meth - method max_4 : float -> float -> float -> float -> float meth + method max_4 : float -> float -> float -> float -> float meth - method min : float -> float -> float meth + method min : float -> float -> float meth - method min_3 : float -> float -> float -> float meth + method min_3 : float -> float -> float -> float meth - method min_4 : float -> float -> float -> float -> float meth + method min_4 : float -> float -> float -> float -> float meth - method pow : float -> float -> float meth + method pow : float -> float -> float meth - method random : float meth + method random : float meth - method round : float -> float meth + method round : float -> float meth - method sin : float -> float meth + method sin : float -> float meth - method sqrt : float -> float meth + method sqrt : float -> float meth - method tan : float -> float meth - end + method tan : float -> float meth +end val math : math t (** The Math object *) (** Specification of Javascript error object. *) -class type error = - object - method name : js_string t prop +class type error = object + method name : js_string t prop - method message : js_string t prop + method message : js_string t prop - method stack : js_string t optdef prop + method stack : js_string t optdef prop - method toString : js_string t meth - end + method toString : js_string t meth +end val error_constr : (js_string t -> error t) constr (** Constructor of [Error] objects: @@ -739,12 +728,11 @@ module Js_error : sig end (** Specification of Javascript JSON object. *) -class type json = - object - method parse : js_string t -> 'a meth +class type json = object + method parse : js_string t -> 'a meth - method stringify : 'a -> js_string t meth - end + method stringify : 'a -> js_string t meth +end val _JSON : json t (** JSON object *) @@ -984,7 +972,7 @@ module Unsafe : sig (** {3 Deprecated functions.} *) external variable : string -> 'a = "caml_js_var" - [@@ocaml.deprecated "[since 2.6] use Js.Unsafe.pure_js_expr instead"] + [@@ocaml.deprecated "[since 2.6] use Js.Unsafe.pure_js_expr instead"] (** Access a Javascript variable. [variable "foo"] will return the current value of variable [foo]. *) end @@ -992,13 +980,13 @@ end (** {2 Deprecated functions and types.} *) val string_of_error : error t -> string - [@@ocaml.deprecated "[since 4.0] Use [Js_error.to_string] instead."] +[@@ocaml.deprecated "[since 4.0] Use [Js_error.to_string] instead."] val raise_js_error : error t -> 'a - [@@ocaml.deprecated "[since 4.0] Use [Js_error.raise_] instead."] +[@@ocaml.deprecated "[since 4.0] Use [Js_error.raise_] instead."] val exn_with_js_backtrace : exn -> force:bool -> exn - [@@ocaml.deprecated "[since 4.0] Use [Js_error.raise_] instead."] +[@@ocaml.deprecated "[since 4.0] Use [Js_error.raise_] instead."] (** Attach a JavasScript error to an OCaml exception. if [force = false] and a JavasScript error is already attached, it will do nothing. This function is useful to store and retrieve information about JavaScript stack traces. @@ -1008,7 +996,7 @@ val exn_with_js_backtrace : exn -> force:bool -> exn *) val js_error_of_exn : exn -> error t opt - [@@ocaml.deprecated "[since 4.0] Use [Js_error.of_exn] instead."] +[@@ocaml.deprecated "[since 4.0] Use [Js_error.of_exn] instead."] (** Extract a JavaScript error attached to an OCaml exception, if any. This is useful to inspect an eventual stack strace, especially when sourcemap is enabled. *) diff --git a/lib/js_of_ocaml/json.ml b/lib/js_of_ocaml/json.ml index c3afe1851f..0088b3ddd6 100644 --- a/lib/js_of_ocaml/json.ml +++ b/lib/js_of_ocaml/json.ml @@ -20,18 +20,17 @@ open Js open! Import -class type json = - object - method parse : 'a. js_string t -> 'a meth +class type json = object + method parse : 'a. js_string t -> 'a meth - method parse_ : - 'a 'b 'c 'd. js_string t -> ('b t, js_string t -> 'c -> 'd) meth_callback -> 'a meth + method parse_ : + 'a 'b 'c 'd. js_string t -> ('b t, js_string t -> 'c -> 'd) meth_callback -> 'a meth - method stringify : 'a. 'a -> js_string t meth + method stringify : 'a. 'a -> js_string t meth - method stringify_ : - 'a 'b 'c 'd. 'a -> ('b, js_string t -> 'c -> 'd) meth_callback -> js_string t meth - end + method stringify_ : + 'a 'b 'c 'd. 'a -> ('b, js_string t -> 'c -> 'd) meth_callback -> js_string t meth +end let json : json Js.t = Unsafe.global##._JSON @@ -54,10 +53,9 @@ let input_reviver = let unsafe_input s = json##parse_ s input_reviver -class type obj = - object - method constructor : 'a. 'a constr Js.readonly_prop - end +class type obj = object + method constructor : 'a. 'a constr Js.readonly_prop +end let mlInt64_constr = let dummy_int64 = 1L in diff --git a/lib/js_of_ocaml/mutationObserver.ml b/lib/js_of_ocaml/mutationObserver.ml index 125c3d3086..3781b06efc 100644 --- a/lib/js_of_ocaml/mutationObserver.ml +++ b/lib/js_of_ocaml/mutationObserver.ml @@ -18,52 +18,49 @@ *) open! Import -class type mutationObserverInit = - object - method childList : bool Js.writeonly_prop +class type mutationObserverInit = object + method childList : bool Js.writeonly_prop - method attributes : bool Js.writeonly_prop + method attributes : bool Js.writeonly_prop - method characterData : bool Js.writeonly_prop + method characterData : bool Js.writeonly_prop - method subtree : bool Js.writeonly_prop + method subtree : bool Js.writeonly_prop - method attributeOldValue : bool Js.writeonly_prop + method attributeOldValue : bool Js.writeonly_prop - method characterDataOldValue : bool Js.writeonly_prop + method characterDataOldValue : bool Js.writeonly_prop - method attributeFilter : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop - end + method attributeFilter : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop +end -class type mutationRecord = - object - method _type : Js.js_string Js.t Js.readonly_prop +class type mutationRecord = object + method _type : Js.js_string Js.t Js.readonly_prop - method target : Dom.node Js.t Js.readonly_prop + method target : Dom.node Js.t Js.readonly_prop - method addedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop + method addedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop - method removedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop + method removedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop - method previousSibling : Dom.node Js.t Js.opt Js.readonly_prop + method previousSibling : Dom.node Js.t Js.opt Js.readonly_prop - method nextSibling : Dom.node Js.t Js.opt Js.readonly_prop + method nextSibling : Dom.node Js.t Js.opt Js.readonly_prop - method attributeName : Js.js_string Js.t Js.opt Js.readonly_prop + method attributeName : Js.js_string Js.t Js.opt Js.readonly_prop - method attributeNamespace : Js.js_string Js.t Js.opt Js.readonly_prop + method attributeNamespace : Js.js_string Js.t Js.opt Js.readonly_prop - method oldValue : Js.js_string Js.t Js.opt Js.readonly_prop - end + method oldValue : Js.js_string Js.t Js.opt Js.readonly_prop +end -class type mutationObserver = - object - method observe : #Dom.node Js.t -> mutationObserverInit Js.t -> unit Js.meth +class type mutationObserver = object + method observe : #Dom.node Js.t -> mutationObserverInit Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : mutationRecord Js.t Js.js_array Js.t Js.meth - end + method takeRecords : mutationRecord Js.t Js.js_array Js.t Js.meth +end let empty_mutation_observer_init () : mutationObserverInit Js.t = Js.Unsafe.obj [||] diff --git a/lib/js_of_ocaml/mutationObserver.mli b/lib/js_of_ocaml/mutationObserver.mli index 0bd3377136..edc9b4ac6e 100644 --- a/lib/js_of_ocaml/mutationObserver.mli +++ b/lib/js_of_ocaml/mutationObserver.mli @@ -40,52 +40,49 @@ @see for API documentation. @see for the Web Hypertext Application Technology Working Group (WHATWG) spec. *) -class type mutationObserverInit = - object - method childList : bool Js.writeonly_prop +class type mutationObserverInit = object + method childList : bool Js.writeonly_prop - method attributes : bool Js.writeonly_prop + method attributes : bool Js.writeonly_prop - method characterData : bool Js.writeonly_prop + method characterData : bool Js.writeonly_prop - method subtree : bool Js.writeonly_prop + method subtree : bool Js.writeonly_prop - method attributeOldValue : bool Js.writeonly_prop + method attributeOldValue : bool Js.writeonly_prop - method characterDataOldValue : bool Js.writeonly_prop + method characterDataOldValue : bool Js.writeonly_prop - method attributeFilter : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop - end + method attributeFilter : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop +end -class type mutationRecord = - object - method _type : Js.js_string Js.t Js.readonly_prop +class type mutationRecord = object + method _type : Js.js_string Js.t Js.readonly_prop - method target : Dom.node Js.t Js.readonly_prop + method target : Dom.node Js.t Js.readonly_prop - method addedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop + method addedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop - method removedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop + method removedNodes : Dom.node Dom.nodeList Js.t Js.readonly_prop - method previousSibling : Dom.node Js.t Js.opt Js.readonly_prop + method previousSibling : Dom.node Js.t Js.opt Js.readonly_prop - method nextSibling : Dom.node Js.t Js.opt Js.readonly_prop + method nextSibling : Dom.node Js.t Js.opt Js.readonly_prop - method attributeName : Js.js_string Js.t Js.opt Js.readonly_prop + method attributeName : Js.js_string Js.t Js.opt Js.readonly_prop - method attributeNamespace : Js.js_string Js.t Js.opt Js.readonly_prop + method attributeNamespace : Js.js_string Js.t Js.opt Js.readonly_prop - method oldValue : Js.js_string Js.t Js.opt Js.readonly_prop - end + method oldValue : Js.js_string Js.t Js.opt Js.readonly_prop +end -class type mutationObserver = - object - method observe : #Dom.node Js.t -> mutationObserverInit Js.t -> unit Js.meth +class type mutationObserver = object + method observe : #Dom.node Js.t -> mutationObserverInit Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : mutationRecord Js.t Js.js_array Js.t Js.meth - end + method takeRecords : mutationRecord Js.t Js.js_array Js.t Js.meth +end val empty_mutation_observer_init : unit -> mutationObserverInit Js.t diff --git a/lib/js_of_ocaml/performanceObserver.ml b/lib/js_of_ocaml/performanceObserver.ml index c6daece939..a294866229 100644 --- a/lib/js_of_ocaml/performanceObserver.ml +++ b/lib/js_of_ocaml/performanceObserver.ml @@ -19,35 +19,31 @@ open! Import -class type performanceObserverInit = - object - method entryTypes : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop - end +class type performanceObserverInit = object + method entryTypes : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop +end -class type performanceEntry = - object - method name : Js.js_string Js.t Js.readonly_prop +class type performanceEntry = object + method name : Js.js_string Js.t Js.readonly_prop - method entryType : Js.js_string Js.t Js.readonly_prop + method entryType : Js.js_string Js.t Js.readonly_prop - method startTime : float Js.readonly_prop + method startTime : float Js.readonly_prop - method duration : float Js.readonly_prop - end + method duration : float Js.readonly_prop +end -class type performanceObserverEntryList = - object - method getEntries : performanceEntry Js.t Js.js_array Js.t Js.meth - end +class type performanceObserverEntryList = object + method getEntries : performanceEntry Js.t Js.js_array Js.t Js.meth +end -class type performanceObserver = - object - method observe : performanceObserverInit Js.t -> unit Js.meth +class type performanceObserver = object + method observe : performanceObserverInit Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : performanceEntry Js.t Js.js_array Js.t Js.meth - end + method takeRecords : performanceEntry Js.t Js.js_array Js.t Js.meth +end let performanceObserver = Js.Unsafe.global##._PerformanceObserver diff --git a/lib/js_of_ocaml/performanceObserver.mli b/lib/js_of_ocaml/performanceObserver.mli index 2484dbf6bd..5b19aed8c7 100644 --- a/lib/js_of_ocaml/performanceObserver.mli +++ b/lib/js_of_ocaml/performanceObserver.mli @@ -35,35 +35,31 @@ @see for API documentation. *) -class type performanceObserverInit = - object - method entryTypes : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop - end +class type performanceObserverInit = object + method entryTypes : Js.js_string Js.t Js.js_array Js.t Js.writeonly_prop +end -class type performanceEntry = - object - method name : Js.js_string Js.t Js.readonly_prop +class type performanceEntry = object + method name : Js.js_string Js.t Js.readonly_prop - method entryType : Js.js_string Js.t Js.readonly_prop + method entryType : Js.js_string Js.t Js.readonly_prop - method startTime : float Js.readonly_prop + method startTime : float Js.readonly_prop - method duration : float Js.readonly_prop - end + method duration : float Js.readonly_prop +end -class type performanceObserverEntryList = - object - method getEntries : performanceEntry Js.t Js.js_array Js.t Js.meth - end +class type performanceObserverEntryList = object + method getEntries : performanceEntry Js.t Js.js_array Js.t Js.meth +end -class type performanceObserver = - object - method observe : performanceObserverInit Js.t -> unit Js.meth +class type performanceObserver = object + method observe : performanceObserverInit Js.t -> unit Js.meth - method disconnect : unit Js.meth + method disconnect : unit Js.meth - method takeRecords : performanceEntry Js.t Js.js_array Js.t Js.meth - end + method takeRecords : performanceEntry Js.t Js.js_array Js.t Js.meth +end val performanceObserver : ( (performanceObserverEntryList Js.t -> performanceObserver Js.t -> unit) Js.callback diff --git a/lib/js_of_ocaml/resizeObserver.ml b/lib/js_of_ocaml/resizeObserver.ml index b4705a3d64..80dbb9e835 100644 --- a/lib/js_of_ocaml/resizeObserver.ml +++ b/lib/js_of_ocaml/resizeObserver.ml @@ -18,40 +18,36 @@ *) open! Import -class type resizeObserverSize = - object - method inlineSize : float Js.readonly_prop +class type resizeObserverSize = object + method inlineSize : float Js.readonly_prop - method blockSize : float Js.readonly_prop - end + method blockSize : float Js.readonly_prop +end -class type resizeObserverEntry = - object - method target : Dom.node Js.t Js.readonly_prop +class type resizeObserverEntry = object + method target : Dom.node Js.t Js.readonly_prop - method contentRect : Dom_html.clientRect Js.t Js.readonly_prop + method contentRect : Dom_html.clientRect Js.t Js.readonly_prop - method borderBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop + method borderBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop - method contentBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop - end + method contentBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop +end -class type resizeObserverOptions = - object - method box : Js.js_string Js.t Js.writeonly_prop - end +class type resizeObserverOptions = object + method box : Js.js_string Js.t Js.writeonly_prop +end -class type resizeObserver = - object - method observe : #Dom.node Js.t -> unit Js.meth +class type resizeObserver = object + method observe : #Dom.node Js.t -> unit Js.meth - method observe_withOptions : - #Dom.node Js.t -> resizeObserverOptions Js.t -> unit Js.meth + method observe_withOptions : + #Dom.node Js.t -> resizeObserverOptions Js.t -> unit Js.meth - method unobserve : #Dom.node Js.t -> unit Js.meth + method unobserve : #Dom.node Js.t -> unit Js.meth - method disconnect : unit Js.meth - end + method disconnect : unit Js.meth +end let empty_resize_observer_options () : resizeObserverOptions Js.t = Js.Unsafe.obj [||] diff --git a/lib/js_of_ocaml/resizeObserver.mli b/lib/js_of_ocaml/resizeObserver.mli index e15de57925..66d3258406 100644 --- a/lib/js_of_ocaml/resizeObserver.mli +++ b/lib/js_of_ocaml/resizeObserver.mli @@ -41,40 +41,36 @@ @see for W3C draft spec *) -class type resizeObserverSize = - object - method inlineSize : float Js.readonly_prop +class type resizeObserverSize = object + method inlineSize : float Js.readonly_prop - method blockSize : float Js.readonly_prop - end + method blockSize : float Js.readonly_prop +end -class type resizeObserverEntry = - object - method target : Dom.node Js.t Js.readonly_prop +class type resizeObserverEntry = object + method target : Dom.node Js.t Js.readonly_prop - method contentRect : Dom_html.clientRect Js.t Js.readonly_prop + method contentRect : Dom_html.clientRect Js.t Js.readonly_prop - method borderBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop + method borderBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop - method contentBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop - end + method contentBoxSize : resizeObserverSize Js.t Js.js_array Js.t Js.readonly_prop +end -class type resizeObserverOptions = - object - method box : Js.js_string Js.t Js.writeonly_prop - end +class type resizeObserverOptions = object + method box : Js.js_string Js.t Js.writeonly_prop +end -class type resizeObserver = - object - method observe : #Dom.node Js.t -> unit Js.meth +class type resizeObserver = object + method observe : #Dom.node Js.t -> unit Js.meth - method observe_withOptions : - #Dom.node Js.t -> resizeObserverOptions Js.t -> unit Js.meth + method observe_withOptions : + #Dom.node Js.t -> resizeObserverOptions Js.t -> unit Js.meth - method unobserve : #Dom.node Js.t -> unit Js.meth + method unobserve : #Dom.node Js.t -> unit Js.meth - method disconnect : unit Js.meth - end + method disconnect : unit Js.meth +end val empty_resize_observer_options : unit -> resizeObserverOptions Js.t diff --git a/lib/js_of_ocaml/typed_array.ml b/lib/js_of_ocaml/typed_array.ml index d6a40320d2..571c1bdf7b 100644 --- a/lib/js_of_ocaml/typed_array.ml +++ b/lib/js_of_ocaml/typed_array.ml @@ -22,50 +22,47 @@ open Js type uint32 = float -class type arrayBuffer = - object - method byteLength : int readonly_prop +class type arrayBuffer = object + method byteLength : int readonly_prop - method slice : int -> int -> arrayBuffer t meth + method slice : int -> int -> arrayBuffer t meth - method slice_toEnd : int -> arrayBuffer t meth - end + method slice_toEnd : int -> arrayBuffer t meth +end let arrayBuffer : (int -> arrayBuffer t) constr = Js.Unsafe.global##._ArrayBuffer -class type arrayBufferView = - object - method buffer : arrayBuffer t readonly_prop +class type arrayBufferView = object + method buffer : arrayBuffer t readonly_prop - method byteOffset : int readonly_prop + method byteOffset : int readonly_prop - method byteLength : int readonly_prop - end + method byteLength : int readonly_prop +end -class type ['a, 'b] typedArray = - object - inherit arrayBufferView +class type ['a, 'b] typedArray = object + inherit arrayBufferView - method _BYTES_PER_ELEMENT : int readonly_prop + method _BYTES_PER_ELEMENT : int readonly_prop - method length : int readonly_prop + method length : int readonly_prop - method set_fromArray : 'a js_array t -> int -> unit meth + method set_fromArray : 'a js_array t -> int -> unit meth - method set_fromTypedArray : ('a, 'b) typedArray t -> int -> unit meth + method set_fromTypedArray : ('a, 'b) typedArray t -> int -> unit meth - method subarray : int -> int -> ('a, 'b) typedArray t meth + method subarray : int -> int -> ('a, 'b) typedArray t meth - method subarray_toEnd : int -> ('a, 'b) typedArray t meth + method subarray_toEnd : int -> ('a, 'b) typedArray t meth - method slice : int -> int -> ('a, 'b) typedArray t meth + method slice : int -> int -> ('a, 'b) typedArray t meth - method slice_toEnd : int -> ('a, 'b) typedArray t meth + method slice_toEnd : int -> ('a, 'b) typedArray t meth - (* This fake method is needed for typing purposes. - Without it, ['b] would not be constrained. *) - method _content_type_ : 'b optdef readonly_prop - end + (* This fake method is needed for typing purposes. + Without it, ['b] would not be constrained. *) + method _content_type_ : 'b optdef readonly_prop +end type int8Array = (int, Bigarray.int8_signed_elt) typedArray @@ -181,66 +178,65 @@ let get : ('a, 'b) typedArray t -> int -> 'a optdef = fun a i -> Js.Unsafe.get a let unsafe_get : ('a, 'b) typedArray t -> int -> 'a = fun a i -> Js.Unsafe.get a i -class type dataView = - object - inherit arrayBufferView +class type dataView = object + inherit arrayBufferView - method getInt8 : int -> int meth + method getInt8 : int -> int meth - method getUint8 : int -> int meth + method getUint8 : int -> int meth - method getInt16 : int -> int meth + method getInt16 : int -> int meth - method getInt16_ : int -> bool t -> int meth + method getInt16_ : int -> bool t -> int meth - method getUint16 : int -> int meth + method getUint16 : int -> int meth - method getUint16_ : int -> bool t -> int meth + method getUint16_ : int -> bool t -> int meth - method getInt32 : int -> int meth + method getInt32 : int -> int meth - method getInt32_ : int -> bool t -> int meth + method getInt32_ : int -> bool t -> int meth - method getUint32 : int -> uint32 meth + method getUint32 : int -> uint32 meth - method getUint32_ : int -> bool t -> uint32 meth + method getUint32_ : int -> bool t -> uint32 meth - method getFloat32 : int -> float meth + method getFloat32 : int -> float meth - method getFloat32_ : int -> bool t -> float meth + method getFloat32_ : int -> bool t -> float meth - method getFloat64 : int -> float meth + method getFloat64 : int -> float meth - method getFloat64_ : int -> bool t -> float meth + method getFloat64_ : int -> bool t -> float meth - method setInt8 : int -> int -> unit meth + method setInt8 : int -> int -> unit meth - method setUint8 : int -> int -> unit meth + method setUint8 : int -> int -> unit meth - method setInt16 : int -> int -> unit meth + method setInt16 : int -> int -> unit meth - method setInt16_ : int -> int -> bool t -> unit meth + method setInt16_ : int -> int -> bool t -> unit meth - method setUint16 : int -> int -> unit meth + method setUint16 : int -> int -> unit meth - method setUint16_ : int -> int -> bool t -> unit meth + method setUint16_ : int -> int -> bool t -> unit meth - method setInt32 : int -> int -> unit meth + method setInt32 : int -> int -> unit meth - method setInt32_ : int -> int -> bool t -> unit meth + method setInt32_ : int -> int -> bool t -> unit meth - method setUint32 : int -> uint32 -> unit meth + method setUint32 : int -> uint32 -> unit meth - method setUint32_ : int -> uint32 -> bool t -> unit meth + method setUint32_ : int -> uint32 -> bool t -> unit meth - method setFloat32 : int -> float -> unit meth + method setFloat32 : int -> float -> unit meth - method setFloat32_ : int -> float -> bool t -> unit meth + method setFloat32_ : int -> float -> bool t -> unit meth - method setFloat64 : int -> float -> unit meth + method setFloat64 : int -> float -> unit meth - method setFloat64_ : int -> float -> bool t -> unit meth - end + method setFloat64_ : int -> float -> bool t -> unit meth +end let dataView = Js.Unsafe.global##._DataView diff --git a/lib/js_of_ocaml/typed_array.mli b/lib/js_of_ocaml/typed_array.mli index b69e6edb98..022c476dbe 100644 --- a/lib/js_of_ocaml/typed_array.mli +++ b/lib/js_of_ocaml/typed_array.mli @@ -24,48 +24,45 @@ open Js type uint32 = float -class type arrayBuffer = - object - method byteLength : int readonly_prop +class type arrayBuffer = object + method byteLength : int readonly_prop - method slice : int -> int -> arrayBuffer t meth + method slice : int -> int -> arrayBuffer t meth - method slice_toEnd : int -> arrayBuffer t meth - end + method slice_toEnd : int -> arrayBuffer t meth +end val arrayBuffer : (int -> arrayBuffer t) constr -class type arrayBufferView = - object - method buffer : arrayBuffer t readonly_prop +class type arrayBufferView = object + method buffer : arrayBuffer t readonly_prop - method byteOffset : int readonly_prop + method byteOffset : int readonly_prop - method byteLength : int readonly_prop - end + method byteLength : int readonly_prop +end -class type ['a, 'b] typedArray = - object - inherit arrayBufferView +class type ['a, 'b] typedArray = object + inherit arrayBufferView - method _BYTES_PER_ELEMENT : int readonly_prop + method _BYTES_PER_ELEMENT : int readonly_prop - method length : int readonly_prop + method length : int readonly_prop - method set_fromArray : 'a js_array t -> int -> unit meth + method set_fromArray : 'a js_array t -> int -> unit meth - method set_fromTypedArray : ('a, 'b) typedArray t -> int -> unit meth + method set_fromTypedArray : ('a, 'b) typedArray t -> int -> unit meth - method subarray : int -> int -> ('a, 'b) typedArray t meth + method subarray : int -> int -> ('a, 'b) typedArray t meth - method subarray_toEnd : int -> ('a, 'b) typedArray t meth + method subarray_toEnd : int -> ('a, 'b) typedArray t meth - method slice : int -> int -> ('a, 'b) typedArray t meth + method slice : int -> int -> ('a, 'b) typedArray t meth - method slice_toEnd : int -> ('a, 'b) typedArray t meth + method slice_toEnd : int -> ('a, 'b) typedArray t meth - method _content_type_ : 'b optdef readonly_prop - end + method _content_type_ : 'b optdef readonly_prop +end type int8Array = (int, Bigarray.int8_signed_elt) typedArray @@ -176,66 +173,65 @@ val get : ('a, 'b) typedArray t -> int -> 'a optdef val unsafe_get : ('a, 'b) typedArray t -> int -> 'a -class type dataView = - object - inherit arrayBufferView +class type dataView = object + inherit arrayBufferView - method getInt8 : int -> int meth + method getInt8 : int -> int meth - method getUint8 : int -> int meth + method getUint8 : int -> int meth - method getInt16 : int -> int meth + method getInt16 : int -> int meth - method getInt16_ : int -> bool t -> int meth + method getInt16_ : int -> bool t -> int meth - method getUint16 : int -> int meth + method getUint16 : int -> int meth - method getUint16_ : int -> bool t -> int meth + method getUint16_ : int -> bool t -> int meth - method getInt32 : int -> int meth + method getInt32 : int -> int meth - method getInt32_ : int -> bool t -> int meth + method getInt32_ : int -> bool t -> int meth - method getUint32 : int -> uint32 meth + method getUint32 : int -> uint32 meth - method getUint32_ : int -> bool t -> uint32 meth + method getUint32_ : int -> bool t -> uint32 meth - method getFloat32 : int -> float meth + method getFloat32 : int -> float meth - method getFloat32_ : int -> bool t -> float meth + method getFloat32_ : int -> bool t -> float meth - method getFloat64 : int -> float meth + method getFloat64 : int -> float meth - method getFloat64_ : int -> bool t -> float meth + method getFloat64_ : int -> bool t -> float meth - method setInt8 : int -> int -> unit meth + method setInt8 : int -> int -> unit meth - method setUint8 : int -> int -> unit meth + method setUint8 : int -> int -> unit meth - method setInt16 : int -> int -> unit meth + method setInt16 : int -> int -> unit meth - method setInt16_ : int -> int -> bool t -> unit meth + method setInt16_ : int -> int -> bool t -> unit meth - method setUint16 : int -> int -> unit meth + method setUint16 : int -> int -> unit meth - method setUint16_ : int -> int -> bool t -> unit meth + method setUint16_ : int -> int -> bool t -> unit meth - method setInt32 : int -> int -> unit meth + method setInt32 : int -> int -> unit meth - method setInt32_ : int -> int -> bool t -> unit meth + method setInt32_ : int -> int -> bool t -> unit meth - method setUint32 : int -> uint32 -> unit meth + method setUint32 : int -> uint32 -> unit meth - method setUint32_ : int -> uint32 -> bool t -> unit meth + method setUint32_ : int -> uint32 -> bool t -> unit meth - method setFloat32 : int -> float -> unit meth + method setFloat32 : int -> float -> unit meth - method setFloat32_ : int -> float -> bool t -> unit meth + method setFloat32_ : int -> float -> bool t -> unit meth - method setFloat64 : int -> float -> unit meth + method setFloat64 : int -> float -> unit meth - method setFloat64_ : int -> float -> bool t -> unit meth - end + method setFloat64_ : int -> float -> bool t -> unit meth +end val dataView : (arrayBuffer t -> dataView t) constr diff --git a/lib/js_of_ocaml/webGL.ml b/lib/js_of_ocaml/webGL.ml index d7d9dc36aa..c7d8744dc1 100644 --- a/lib/js_of_ocaml/webGL.ml +++ b/lib/js_of_ocaml/webGL.ml @@ -120,24 +120,23 @@ type shaderPrecisionType type objectType (** 5.2 WebGLContextAttributes *) -class type contextAttributes = - object - method alpha : bool t prop +class type contextAttributes = object + method alpha : bool t prop - method depth : bool t prop + method depth : bool t prop - method stencil : bool t prop + method stencil : bool t prop - method antialias : bool t prop + method antialias : bool t prop - method premultipliedAlpha : bool t prop + method premultipliedAlpha : bool t prop - method preserveDrawingBuffer : bool t prop + method preserveDrawingBuffer : bool t prop - method preferLowPowerToHighPerformance : bool t prop + method preferLowPowerToHighPerformance : bool t prop - method failIfMajorPerformanceCaveat : bool t prop - end + method failIfMajorPerformanceCaveat : bool t prop +end let defaultContextAttributes = Js.Unsafe.( @@ -166,1191 +165,1186 @@ type texture type 'a uniformLocation -class type activeInfo = - object - method size : int readonly_prop - - method _type : uniformType readonly_prop +class type activeInfo = object + method size : int readonly_prop - method name : js_string t readonly_prop - end + method _type : uniformType readonly_prop -class type shaderPrecisionFormat = - object - method rangeMin : int readonly_prop + method name : js_string t readonly_prop +end - method rangeMax : int readonly_prop +class type shaderPrecisionFormat = object + method rangeMin : int readonly_prop - method precision : int readonly_prop - end + method rangeMax : int readonly_prop -class type renderingContext = - object + method precision : int readonly_prop +end - (** 5.13.1 Attributes *) +class type renderingContext = object + +(** 5.13.1 Attributes *) - method canvas : Dom_html.canvasElement t readonly_prop + method canvas : Dom_html.canvasElement t readonly_prop - method drawingBufferWidth : sizei readonly_prop + method drawingBufferWidth : sizei readonly_prop - method drawingBufferHeight : sizei readonly_prop + method drawingBufferHeight : sizei readonly_prop - (** 5.13.2 Getting information about the context *) + (** 5.13.2 Getting information about the context *) - method getContextAttributes : contextAttributes t meth + method getContextAttributes : contextAttributes t meth - (** 5.13.3 Setting and getting state *) + (** 5.13.3 Setting and getting state *) - method activeTexture : textureUnit -> unit meth + method activeTexture : textureUnit -> unit meth - method blendColor : clampf -> clampf -> clampf -> clampf -> unit meth + method blendColor : clampf -> clampf -> clampf -> clampf -> unit meth - method blendEquation : blendMode -> unit meth + method blendEquation : blendMode -> unit meth - method blendEquationSeparate : blendMode -> blendMode -> unit meth + method blendEquationSeparate : blendMode -> blendMode -> unit meth - method blendFunc : blendingFactor -> blendingFactor -> unit meth + method blendFunc : blendingFactor -> blendingFactor -> unit meth - method blendFuncSeparate : - blendingFactor -> blendingFactor -> blendingFactor -> blendingFactor -> unit meth + method blendFuncSeparate : + blendingFactor -> blendingFactor -> blendingFactor -> blendingFactor -> unit meth - method clearColor : clampf -> clampf -> clampf -> clampf -> unit meth + method clearColor : clampf -> clampf -> clampf -> clampf -> unit meth - method clearDepth : clampf -> unit meth + method clearDepth : clampf -> unit meth - method clearStencil : int -> unit meth + method clearStencil : int -> unit meth - method colorMask : bool t -> bool t -> bool t -> bool t -> unit meth + method colorMask : bool t -> bool t -> bool t -> bool t -> unit meth - method cullFace : cullFaceMode -> unit meth + method cullFace : cullFaceMode -> unit meth - method depthFunc : depthFunction -> unit meth + method depthFunc : depthFunction -> unit meth - method depthMask : bool t -> unit meth + method depthMask : bool t -> unit meth - method depthRange : clampf -> clampf -> unit meth + method depthRange : clampf -> clampf -> unit meth - method disable : enableCap -> unit meth + method disable : enableCap -> unit meth - method enable : enableCap -> unit meth + method enable : enableCap -> unit meth - method frontFace : frontFaceDir -> unit meth + method frontFace : frontFaceDir -> unit meth - method getParameter : 'a. 'a parameter -> 'a meth + method getParameter : 'a. 'a parameter -> 'a meth - method getError : errorCode meth + method getError : errorCode meth - method hint : hintTarget -> hintMode -> unit meth + method hint : hintTarget -> hintMode -> unit meth - method isEnabled : enableCap -> bool t meth + method isEnabled : enableCap -> bool t meth - method lineWidth : float -> unit meth + method lineWidth : float -> unit meth - method pixelStorei : 'a. 'a pixelStoreParam -> 'a -> unit meth + method pixelStorei : 'a. 'a pixelStoreParam -> 'a -> unit meth - method polygonOffset : float -> float -> unit meth + method polygonOffset : float -> float -> unit meth - method sampleCoverage : clampf -> bool t -> unit meth + method sampleCoverage : clampf -> bool t -> unit meth - method stencilFunc : depthFunction -> int -> uint -> unit meth + method stencilFunc : depthFunction -> int -> uint -> unit meth - method stencilFuncSeparate : cullFaceMode -> depthFunction -> int -> uint -> unit meth + method stencilFuncSeparate : cullFaceMode -> depthFunction -> int -> uint -> unit meth - method stencilMask : uint -> unit meth + method stencilMask : uint -> unit meth - method stencilMaskSeparate : cullFaceMode -> uint -> unit meth + method stencilMaskSeparate : cullFaceMode -> uint -> unit meth - method stencilOp : stencilOp -> stencilOp -> stencilOp -> unit meth + method stencilOp : stencilOp -> stencilOp -> stencilOp -> unit meth - method stencilOpSeparate : - cullFaceMode -> stencilOp -> stencilOp -> stencilOp -> unit meth + method stencilOpSeparate : + cullFaceMode -> stencilOp -> stencilOp -> stencilOp -> unit meth - (** 5.13.4 Viewing and clipping *) + (** 5.13.4 Viewing and clipping *) - method scissor : int -> int -> sizei -> sizei -> unit meth + method scissor : int -> int -> sizei -> sizei -> unit meth - method viewport : int -> int -> sizei -> sizei -> unit meth + method viewport : int -> int -> sizei -> sizei -> unit meth - (** 5.13.5 Buffer objects *) + (** 5.13.5 Buffer objects *) - method bindBuffer : bufferTarget -> buffer t -> unit meth + method bindBuffer : bufferTarget -> buffer t -> unit meth - method bindBuffer_ : bufferTarget -> buffer t opt -> unit meth + method bindBuffer_ : bufferTarget -> buffer t opt -> unit meth - method bufferData_create : bufferTarget -> sizeiptr -> bufferUsage -> unit meth + method bufferData_create : bufferTarget -> sizeiptr -> bufferUsage -> unit meth - method bufferData : - bufferTarget -> #Typed_array.arrayBufferView t -> bufferUsage -> unit meth + method bufferData : + bufferTarget -> #Typed_array.arrayBufferView t -> bufferUsage -> unit meth - method bufferData_raw : - bufferTarget -> Typed_array.arrayBuffer t -> bufferUsage -> unit meth + method bufferData_raw : + bufferTarget -> Typed_array.arrayBuffer t -> bufferUsage -> unit meth - method bufferSubData : - bufferTarget -> intptr -> #Typed_array.arrayBufferView t -> unit meth + method bufferSubData : + bufferTarget -> intptr -> #Typed_array.arrayBufferView t -> unit meth - method bufferSubData_raw : - bufferTarget -> intptr -> Typed_array.arrayBuffer t -> unit meth + method bufferSubData_raw : + bufferTarget -> intptr -> Typed_array.arrayBuffer t -> unit meth - method createBuffer : buffer t meth + method createBuffer : buffer t meth - method deleteBuffer : buffer t -> unit meth + method deleteBuffer : buffer t -> unit meth - method getBufferParameter : 'a. bufferTarget -> 'a bufferParameter -> 'a meth + method getBufferParameter : 'a. bufferTarget -> 'a bufferParameter -> 'a meth - method isBuffer : buffer t -> bool t meth + method isBuffer : buffer t -> bool t meth - (** 5.13.6 Framebuffer objects *) + (** 5.13.6 Framebuffer objects *) - method bindFramebuffer : fbTarget -> framebuffer t -> unit meth + method bindFramebuffer : fbTarget -> framebuffer t -> unit meth - method bindFramebuffer_ : fbTarget -> framebuffer t opt -> unit meth + method bindFramebuffer_ : fbTarget -> framebuffer t opt -> unit meth - method checkFramebufferStatus : fbTarget -> framebufferStatus meth + method checkFramebufferStatus : fbTarget -> framebufferStatus meth - method createFramebuffer : framebuffer t meth + method createFramebuffer : framebuffer t meth - method deleteFramebuffer : framebuffer t -> unit meth + method deleteFramebuffer : framebuffer t -> unit meth - method framebufferRenderbuffer : - fbTarget -> attachmentPoint -> rbTarget -> renderbuffer t -> unit meth + method framebufferRenderbuffer : + fbTarget -> attachmentPoint -> rbTarget -> renderbuffer t -> unit meth - method framebufferTexture2D : - fbTarget -> attachmentPoint -> texTarget -> texture t -> int -> unit meth + method framebufferTexture2D : + fbTarget -> attachmentPoint -> texTarget -> texture t -> int -> unit meth - method getFramebufferAttachmentParameter : - 'a. fbTarget -> attachmentPoint -> 'a attachParam -> 'a meth + method getFramebufferAttachmentParameter : + 'a. fbTarget -> attachmentPoint -> 'a attachParam -> 'a meth - method isFramebuffer : framebuffer t -> bool t meth + method isFramebuffer : framebuffer t -> bool t meth - (** 5.13.7 Renderbuffer objects *) + (** 5.13.7 Renderbuffer objects *) - method bindRenderbuffer : rbTarget -> renderbuffer t -> unit meth + method bindRenderbuffer : rbTarget -> renderbuffer t -> unit meth - method bindRenderbuffer_ : rbTarget -> renderbuffer t opt -> unit meth + method bindRenderbuffer_ : rbTarget -> renderbuffer t opt -> unit meth - method createRenderbuffer : renderbuffer t meth + method createRenderbuffer : renderbuffer t meth - method deleteRenderbuffer : renderbuffer t -> unit meth + method deleteRenderbuffer : renderbuffer t -> unit meth - method getRenderbufferParameter : 'a. rbTarget -> 'a renderbufferParam -> 'a meth + method getRenderbufferParameter : 'a. rbTarget -> 'a renderbufferParam -> 'a meth - method isRenderbuffer : renderbuffer t -> bool t meth + method isRenderbuffer : renderbuffer t -> bool t meth - method renderbufferStorage : rbTarget -> format -> sizei -> sizei -> unit meth + method renderbufferStorage : rbTarget -> format -> sizei -> sizei -> unit meth - (** 5.13.8 Texture objects *) + (** 5.13.8 Texture objects *) - method bindTexture : texTarget -> texture t -> unit meth + method bindTexture : texTarget -> texture t -> unit meth - method bindTexture_ : texTarget -> texture t opt -> unit meth + method bindTexture_ : texTarget -> texture t opt -> unit meth - method compressedTexImage2D : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> #Typed_array.arrayBufferView t - -> unit meth + method compressedTexImage2D : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> #Typed_array.arrayBufferView t + -> unit meth - method compressedTexSubImage2D : - texTarget - -> int - -> int - -> int - -> sizei - -> sizei - -> pixelFormat - -> #Typed_array.arrayBufferView t - -> unit meth + method compressedTexSubImage2D : + texTarget + -> int + -> int + -> int + -> sizei + -> sizei + -> pixelFormat + -> #Typed_array.arrayBufferView t + -> unit meth - method copyTexImage2D : - texTarget -> int -> pixelFormat -> int -> int -> sizei -> sizei -> int -> unit meth + method copyTexImage2D : + texTarget -> int -> pixelFormat -> int -> int -> sizei -> sizei -> int -> unit meth - method copyTexSubImage2D : - texTarget -> int -> int -> int -> int -> int -> sizei -> sizei -> unit meth + method copyTexSubImage2D : + texTarget -> int -> int -> int -> int -> int -> sizei -> sizei -> unit meth - method createTexture : texture t meth + method createTexture : texture t meth - method deleteTexture : texture t -> unit meth + method deleteTexture : texture t -> unit meth - method generateMipmap : texTarget -> unit meth - - method getTexParameter : texTarget -> 'a texParam -> 'a meth - - method isTexture : texture t -> bool t meth - - method texImage2D_new : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> pixelFormat - -> pixelType - -> void opt - -> unit meth - - method texImage2D_fromView : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth - - method texImage2D_fromImageData : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.imageData t - -> unit meth - - method texImage2D_fromImage : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.imageElement t - -> unit meth - - method texImage2D_fromCanvas : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.canvasElement t - -> unit meth - - method texImage2D_fromVideo : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.videoElement t - -> unit meth - - (* {[ - method texParameterf : texTarget -> texParam -> float -> unit meth - ]} - *) - method texParameteri : texTarget -> 'a texParam -> 'a -> unit meth - - method texSubImage2D_fromView : - texTarget - -> int - -> int - -> int - -> sizei - -> sizei - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth - - method texSubImage2D_fromImageData : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.imageData t - -> unit meth + method generateMipmap : texTarget -> unit meth + + method getTexParameter : texTarget -> 'a texParam -> 'a meth + + method isTexture : texture t -> bool t meth + + method texImage2D_new : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> pixelFormat + -> pixelType + -> void opt + -> unit meth + + method texImage2D_fromView : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth + + method texImage2D_fromImageData : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.imageData t + -> unit meth + + method texImage2D_fromImage : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.imageElement t + -> unit meth + + method texImage2D_fromCanvas : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.canvasElement t + -> unit meth + + method texImage2D_fromVideo : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.videoElement t + -> unit meth + + (* {[ + method texParameterf : texTarget -> texParam -> float -> unit meth + ]} + *) + method texParameteri : texTarget -> 'a texParam -> 'a -> unit meth + + method texSubImage2D_fromView : + texTarget + -> int + -> int + -> int + -> sizei + -> sizei + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth + + method texSubImage2D_fromImageData : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.imageData t + -> unit meth - method texSubImage2D_fromImage : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.imageElement t - -> unit meth + method texSubImage2D_fromImage : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.imageElement t + -> unit meth - method texSubImage2D_fromCanvas : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.canvasElement t - -> unit meth + method texSubImage2D_fromCanvas : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.canvasElement t + -> unit meth - method texSubImage2D_fromVideo : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.videoElement t - -> unit meth + method texSubImage2D_fromVideo : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.videoElement t + -> unit meth - (** 5.13.9 Programs and Shaders *) + (** 5.13.9 Programs and Shaders *) - method attachShader : program t -> shader t -> unit meth + method attachShader : program t -> shader t -> unit meth - method bindAttribLocation : program t -> uint -> js_string t -> unit meth + method bindAttribLocation : program t -> uint -> js_string t -> unit meth - method compileShader : shader t -> unit meth + method compileShader : shader t -> unit meth - method createProgram : program t meth + method createProgram : program t meth - method createShader : shaderType -> shader t meth + method createShader : shaderType -> shader t meth - method deleteProgram : program t -> unit meth + method deleteProgram : program t -> unit meth - method deleteShader : shader t -> unit meth + method deleteShader : shader t -> unit meth - method detachShader : program t -> shader t -> unit meth + method detachShader : program t -> shader t -> unit meth - method getAttachedShaders : program t -> shader t js_array t meth + method getAttachedShaders : program t -> shader t js_array t meth - method getProgramParameter : 'a. program t -> 'a programParam -> 'a meth + method getProgramParameter : 'a. program t -> 'a programParam -> 'a meth - method getProgramInfoLog : program t -> js_string t meth + method getProgramInfoLog : program t -> js_string t meth - method getShaderParameter : 'a. shader t -> 'a shaderParam -> 'a meth + method getShaderParameter : 'a. shader t -> 'a shaderParam -> 'a meth - method getShaderPrecisionFormat : - shaderType -> shaderPrecisionType -> shaderPrecisionFormat t meth + method getShaderPrecisionFormat : + shaderType -> shaderPrecisionType -> shaderPrecisionFormat t meth - method getShaderInfoLog : shader t -> js_string t meth + method getShaderInfoLog : shader t -> js_string t meth - method getShaderSource : shader t -> js_string t meth + method getShaderSource : shader t -> js_string t meth - method isProgram : program t -> bool t meth + method isProgram : program t -> bool t meth - method isShader : shader t -> bool t meth + method isShader : shader t -> bool t meth - method linkProgram : program t -> unit meth + method linkProgram : program t -> unit meth - method shaderSource : shader t -> js_string t -> unit meth + method shaderSource : shader t -> js_string t -> unit meth - method useProgram : program t -> unit meth + method useProgram : program t -> unit meth - method validateProgram : program t -> unit meth + method validateProgram : program t -> unit meth - (** 5.13.10 Uniforms and attributes *) + (** 5.13.10 Uniforms and attributes *) - method disableVertexAttribArray : uint -> unit meth + method disableVertexAttribArray : uint -> unit meth - method enableVertexAttribArray : uint -> unit meth + method enableVertexAttribArray : uint -> unit meth - method getActiveAttrib : program t -> uint -> activeInfo t meth + method getActiveAttrib : program t -> uint -> activeInfo t meth - method getActiveUniform : program t -> uint -> activeInfo t meth + method getActiveUniform : program t -> uint -> activeInfo t meth - method getAttribLocation : program t -> js_string t -> int meth + method getAttribLocation : program t -> js_string t -> int meth - method getUniform : 'a 'b. program t -> 'a uniformLocation t -> 'b meth + method getUniform : 'a 'b. program t -> 'a uniformLocation t -> 'b meth - method getUniformLocation : 'a. program t -> js_string t -> 'a uniformLocation t meth + method getUniformLocation : 'a. program t -> js_string t -> 'a uniformLocation t meth - method getVertexAttrib : 'a. uint -> 'a vertexAttribParam -> 'a meth + method getVertexAttrib : 'a. uint -> 'a vertexAttribParam -> 'a meth - method getVertexAttribOffset : uint -> vertexAttribPointerParam -> sizeiptr meth + method getVertexAttribOffset : uint -> vertexAttribPointerParam -> sizeiptr meth - method uniform1f : float uniformLocation t -> float -> unit meth + method uniform1f : float uniformLocation t -> float -> unit meth - method uniform1fv_typed : - float uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform1fv_typed : + float uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform1fv : float uniformLocation t -> float js_array t -> unit meth + method uniform1fv : float uniformLocation t -> float js_array t -> unit meth - method uniform1i : int uniformLocation t -> int -> unit meth + method uniform1i : int uniformLocation t -> int -> unit meth - method uniform1iv_typed : - int uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform1iv_typed : + int uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform1iv : int uniformLocation t -> int js_array t -> unit meth + method uniform1iv : int uniformLocation t -> int js_array t -> unit meth - method uniform2f : [ `vec2 ] uniformLocation t -> float -> float -> unit meth + method uniform2f : [ `vec2 ] uniformLocation t -> float -> float -> unit meth - method uniform2fv_typed : - [ `vec2 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform2fv_typed : + [ `vec2 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform2fv : [ `vec2 ] uniformLocation t -> float js_array t -> unit meth + method uniform2fv : [ `vec2 ] uniformLocation t -> float js_array t -> unit meth - method uniform2i : [ `ivec2 ] uniformLocation t -> int -> int -> unit meth + method uniform2i : [ `ivec2 ] uniformLocation t -> int -> int -> unit meth - method uniform2iv : [ `ivec2 ] uniformLocation t -> int js_array t -> unit meth + method uniform2iv : [ `ivec2 ] uniformLocation t -> int js_array t -> unit meth - method uniform2iv_typed : - [ `ivec2 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform2iv_typed : + [ `ivec2 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform3f : [ `vec3 ] uniformLocation t -> float -> float -> float -> unit meth + method uniform3f : [ `vec3 ] uniformLocation t -> float -> float -> float -> unit meth - method uniform3fv_typed : - [ `vec3 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform3fv_typed : + [ `vec3 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform3fv : [ `vec3 ] uniformLocation t -> float js_array t -> unit meth + method uniform3fv : [ `vec3 ] uniformLocation t -> float js_array t -> unit meth - method uniform3i : [ `ivec3 ] uniformLocation t -> int -> int -> int -> unit meth + method uniform3i : [ `ivec3 ] uniformLocation t -> int -> int -> int -> unit meth - method uniform3iv : [ `ivec3 ] uniformLocation t -> int js_array t -> unit meth + method uniform3iv : [ `ivec3 ] uniformLocation t -> int js_array t -> unit meth - method uniform3iv_typed : - [ `ivec3 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform3iv_typed : + [ `ivec3 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform4f : - [ `vec4 ] uniformLocation t -> float -> float -> float -> float -> unit meth + method uniform4f : + [ `vec4 ] uniformLocation t -> float -> float -> float -> float -> unit meth - method uniform4fv_typed : - [ `vec4 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform4fv_typed : + [ `vec4 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform4fv : [ `vec4 ] uniformLocation t -> float js_array t -> unit meth + method uniform4fv : [ `vec4 ] uniformLocation t -> float js_array t -> unit meth - method uniform4i : - [ `ivec4 ] uniformLocation t -> int -> int -> int -> int -> unit meth + method uniform4i : + [ `ivec4 ] uniformLocation t -> int -> int -> int -> int -> unit meth - method uniform4iv : [ `ivec4 ] uniformLocation t -> int js_array t -> unit meth + method uniform4iv : [ `ivec4 ] uniformLocation t -> int js_array t -> unit meth - method uniform4iv_typed : - [ `ivec4 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform4iv_typed : + [ `ivec4 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniformMatrix2fv : - [ `mat2 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix2fv : + [ `mat2 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix2fv_typed : - [ `mat2 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix2fv_typed : + [ `mat2 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method uniformMatrix3fv : - [ `mat3 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix3fv : + [ `mat3 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix3fv_typed : - [ `mat3 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix3fv_typed : + [ `mat3 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method uniformMatrix4fv : - [ `mat4 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix4fv : + [ `mat4 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix4fv_typed : - [ `mat4 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix4fv_typed : + [ `mat4 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method vertexAttrib1f : uint -> float -> unit meth + method vertexAttrib1f : uint -> float -> unit meth - method vertexAttrib1fv : uint -> float js_array t -> unit meth + method vertexAttrib1fv : uint -> float js_array t -> unit meth - method vertexAttrib1fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib1fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib2f : uint -> float -> float -> unit meth + method vertexAttrib2f : uint -> float -> float -> unit meth - method vertexAttrib2fv : uint -> float js_array t -> unit meth + method vertexAttrib2fv : uint -> float js_array t -> unit meth - method vertexAttrib2fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib2fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib3f : uint -> float -> float -> float -> unit meth + method vertexAttrib3f : uint -> float -> float -> float -> unit meth - method vertexAttrib3fv : uint -> float js_array t -> unit meth + method vertexAttrib3fv : uint -> float js_array t -> unit meth - method vertexAttrib3fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib3fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib4f : uint -> float -> float -> float -> float -> unit meth + method vertexAttrib4f : uint -> float -> float -> float -> float -> unit meth - method vertexAttrib4fv : uint -> float js_array t -> unit meth + method vertexAttrib4fv : uint -> float js_array t -> unit meth - method vertexAttrib4fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib4fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttribPointer : - uint -> int -> dataType -> bool t -> sizei -> intptr -> unit meth + method vertexAttribPointer : + uint -> int -> dataType -> bool t -> sizei -> intptr -> unit meth - (** 5.13.11 Writing to the drawing buffer *) + (** 5.13.11 Writing to the drawing buffer *) - method clear : clearBufferMask -> unit meth + method clear : clearBufferMask -> unit meth - method drawArrays : beginMode -> int -> sizei -> unit meth + method drawArrays : beginMode -> int -> sizei -> unit meth - method drawElements : beginMode -> sizei -> dataType -> intptr -> unit meth + method drawElements : beginMode -> sizei -> dataType -> intptr -> unit meth - method finish : unit meth + method finish : unit meth - method flush : unit meth + method flush : unit meth - (** 5.13.12 Reading back pixels *) + (** 5.13.12 Reading back pixels *) - method readPixels : - int - -> int - -> sizei - -> sizei - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth + method readPixels : + int + -> int + -> sizei + -> sizei + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth - (** 5.13.13 Detecting context lost events *) + (** 5.13.13 Detecting context lost events *) - method isContextLost : bool t meth + method isContextLost : bool t meth - (** 5.13.14 Detecting and enabling extensions *) + (** 5.13.14 Detecting and enabling extensions *) - method getSupportedExtensions : js_string t js_array t meth + method getSupportedExtensions : js_string t js_array t meth - method getExtension : 'a. js_string t -> 'a t opt meth + method getExtension : 'a. js_string t -> 'a t opt meth - (* Untyped! *) - (** Constants *) + (* Untyped! *) + (** Constants *) - method _DEPTH_BUFFER_BIT_ : clearBufferMask readonly_prop + method _DEPTH_BUFFER_BIT_ : clearBufferMask readonly_prop - method _STENCIL_BUFFER_BIT_ : clearBufferMask readonly_prop + method _STENCIL_BUFFER_BIT_ : clearBufferMask readonly_prop - method _COLOR_BUFFER_BIT_ : clearBufferMask readonly_prop + method _COLOR_BUFFER_BIT_ : clearBufferMask readonly_prop - method _POINTS : beginMode readonly_prop + method _POINTS : beginMode readonly_prop - method _LINES : beginMode readonly_prop + method _LINES : beginMode readonly_prop - method _LINE_LOOP_ : beginMode readonly_prop + method _LINE_LOOP_ : beginMode readonly_prop - method _LINE_STRIP_ : beginMode readonly_prop + method _LINE_STRIP_ : beginMode readonly_prop - method _TRIANGLES : beginMode readonly_prop + method _TRIANGLES : beginMode readonly_prop - method _TRIANGLE_STRIP_ : beginMode readonly_prop + method _TRIANGLE_STRIP_ : beginMode readonly_prop - method _TRIANGLE_FAN_ : beginMode readonly_prop + method _TRIANGLE_FAN_ : beginMode readonly_prop - method _ZERO : blendingFactor readonly_prop + method _ZERO : blendingFactor readonly_prop - method _ONE : blendingFactor readonly_prop + method _ONE : blendingFactor readonly_prop - method _SRC_COLOR_ : blendingFactor readonly_prop + method _SRC_COLOR_ : blendingFactor readonly_prop - method _ONE_MINUS_SRC_COLOR_ : blendingFactor readonly_prop + method _ONE_MINUS_SRC_COLOR_ : blendingFactor readonly_prop - method _SRC_ALPHA_ : blendingFactor readonly_prop + method _SRC_ALPHA_ : blendingFactor readonly_prop - method _ONE_MINUS_SRC_ALPHA_ : blendingFactor readonly_prop + method _ONE_MINUS_SRC_ALPHA_ : blendingFactor readonly_prop - method _DST_ALPHA_ : blendingFactor readonly_prop + method _DST_ALPHA_ : blendingFactor readonly_prop - method _ONE_MINUS_DST_ALPHA_ : blendingFactor readonly_prop + method _ONE_MINUS_DST_ALPHA_ : blendingFactor readonly_prop - method _DST_COLOR_ : blendingFactor readonly_prop + method _DST_COLOR_ : blendingFactor readonly_prop - method _ONE_MINUS_DST_COLOR_ : blendingFactor readonly_prop + method _ONE_MINUS_DST_COLOR_ : blendingFactor readonly_prop - method _SRC_ALPHA_SATURATE_ : blendingFactor readonly_prop + method _SRC_ALPHA_SATURATE_ : blendingFactor readonly_prop - method _FUNC_ADD_ : blendMode readonly_prop + method _FUNC_ADD_ : blendMode readonly_prop - method _FUNC_SUBTRACT_ : blendMode readonly_prop + method _FUNC_SUBTRACT_ : blendMode readonly_prop - method _FUNC_REVERSE_SUBTRACT_ : blendMode readonly_prop + method _FUNC_REVERSE_SUBTRACT_ : blendMode readonly_prop - method _CONSTANT_COLOR_ : blendMode readonly_prop + method _CONSTANT_COLOR_ : blendMode readonly_prop - method _ONE_MINUS_CONSTANT_COLOR_ : blendMode readonly_prop + method _ONE_MINUS_CONSTANT_COLOR_ : blendMode readonly_prop - method _CONSTANT_ALPHA_ : blendMode readonly_prop + method _CONSTANT_ALPHA_ : blendMode readonly_prop - method _ONE_MINUS_CONSTANT_ALPHA_ : blendMode readonly_prop + method _ONE_MINUS_CONSTANT_ALPHA_ : blendMode readonly_prop - method _ARRAY_BUFFER_ : bufferTarget readonly_prop + method _ARRAY_BUFFER_ : bufferTarget readonly_prop - method _ELEMENT_ARRAY_BUFFER_ : bufferTarget readonly_prop + method _ELEMENT_ARRAY_BUFFER_ : bufferTarget readonly_prop - method _STREAM_DRAW_ : bufferUsage readonly_prop + method _STREAM_DRAW_ : bufferUsage readonly_prop - method _STATIC_DRAW_ : bufferUsage readonly_prop + method _STATIC_DRAW_ : bufferUsage readonly_prop - method _DYNAMIC_DRAW_ : bufferUsage readonly_prop + method _DYNAMIC_DRAW_ : bufferUsage readonly_prop - method _FRONT : cullFaceMode readonly_prop + method _FRONT : cullFaceMode readonly_prop - method _BACK : cullFaceMode readonly_prop + method _BACK : cullFaceMode readonly_prop - method _FRONT_AND_BACK_ : cullFaceMode readonly_prop + method _FRONT_AND_BACK_ : cullFaceMode readonly_prop - method _CULL_FACE_ : enableCap readonly_prop + method _CULL_FACE_ : enableCap readonly_prop - method _BLEND : enableCap readonly_prop + method _BLEND : enableCap readonly_prop - method _DITHER : enableCap readonly_prop + method _DITHER : enableCap readonly_prop - method _STENCIL_TEST_ : enableCap readonly_prop + method _STENCIL_TEST_ : enableCap readonly_prop - method _DEPTH_TEST_ : enableCap readonly_prop + method _DEPTH_TEST_ : enableCap readonly_prop - method _SCISSOR_TEST_ : enableCap readonly_prop + method _SCISSOR_TEST_ : enableCap readonly_prop - method _POLYGON_OFFSET_FILL_ : enableCap readonly_prop + method _POLYGON_OFFSET_FILL_ : enableCap readonly_prop - method _SAMPLE_ALPHA_TO_COVERAGE_ : enableCap readonly_prop + method _SAMPLE_ALPHA_TO_COVERAGE_ : enableCap readonly_prop - method _SAMPLE_COVERAGE_ : enableCap readonly_prop + method _SAMPLE_COVERAGE_ : enableCap readonly_prop - method _NO_ERROR_ : errorCode readonly_prop + method _NO_ERROR_ : errorCode readonly_prop - method _INVALID_ENUM_ : errorCode readonly_prop + method _INVALID_ENUM_ : errorCode readonly_prop - method _INVALID_VALUE_ : errorCode readonly_prop + method _INVALID_VALUE_ : errorCode readonly_prop - method _INVALID_OPERATION_ : errorCode readonly_prop + method _INVALID_OPERATION_ : errorCode readonly_prop - method _OUT_OF_MEMORY_ : errorCode readonly_prop + method _OUT_OF_MEMORY_ : errorCode readonly_prop - method _CONTEXT_LOST_WEBGL_ : errorCode readonly_prop + method _CONTEXT_LOST_WEBGL_ : errorCode readonly_prop - method _INVALID_FRAMEBUFFER_OPERATION_ : errorCode readonly_prop + method _INVALID_FRAMEBUFFER_OPERATION_ : errorCode readonly_prop - method _CW : frontFaceDir readonly_prop + method _CW : frontFaceDir readonly_prop - method _CCW : frontFaceDir readonly_prop + method _CCW : frontFaceDir readonly_prop - method _DONT_CARE_ : hintMode readonly_prop + method _DONT_CARE_ : hintMode readonly_prop - method _FASTEST : hintMode readonly_prop + method _FASTEST : hintMode readonly_prop - method _NICEST : hintMode readonly_prop + method _NICEST : hintMode readonly_prop - method _GENERATE_MIPMAP_HINT_ : hintTarget readonly_prop + method _GENERATE_MIPMAP_HINT_ : hintTarget readonly_prop - method _BLEND_EQUATION_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_ : blendMode parameter readonly_prop - method _BLEND_EQUATION_RGB_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_RGB_ : blendMode parameter readonly_prop - method _BLEND_EQUATION_ALPHA_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_ALPHA_ : blendMode parameter readonly_prop - method _BLEND_DST_RGB_ : blendingFactor parameter readonly_prop + method _BLEND_DST_RGB_ : blendingFactor parameter readonly_prop - method _BLEND_SRC_RGB_ : blendingFactor parameter readonly_prop + method _BLEND_SRC_RGB_ : blendingFactor parameter readonly_prop - method _BLEND_DST_ALPHA_ : blendingFactor parameter readonly_prop + method _BLEND_DST_ALPHA_ : blendingFactor parameter readonly_prop - method _BLEND_SRC_ALPHA_ : blendingFactor parameter readonly_prop + method _BLEND_SRC_ALPHA_ : blendingFactor parameter readonly_prop - method _BLEND_COLOR_ : Typed_array.float32Array t parameter readonly_prop + method _BLEND_COLOR_ : Typed_array.float32Array t parameter readonly_prop - method _ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop + method _ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop - method _ELEMENT_ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop + method _ELEMENT_ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop - method _CULL_FACE_PARAM : bool t parameter readonly_prop + method _CULL_FACE_PARAM : bool t parameter readonly_prop - method _BLEND_PARAM : bool t parameter readonly_prop + method _BLEND_PARAM : bool t parameter readonly_prop - method _DITHER_PARAM : bool t parameter readonly_prop + method _DITHER_PARAM : bool t parameter readonly_prop - method _STENCIL_TEST_PARAM : bool t parameter readonly_prop + method _STENCIL_TEST_PARAM : bool t parameter readonly_prop - method _DEPTH_TEST_PARAM : bool t parameter readonly_prop + method _DEPTH_TEST_PARAM : bool t parameter readonly_prop - method _SCISSOR_TEST_PARAM : bool t parameter readonly_prop + method _SCISSOR_TEST_PARAM : bool t parameter readonly_prop - method _POLYGON_OFFSET_FILL_PARAM : bool t parameter readonly_prop + method _POLYGON_OFFSET_FILL_PARAM : bool t parameter readonly_prop - method _LINE_WIDTH_ : float parameter readonly_prop + method _LINE_WIDTH_ : float parameter readonly_prop - method _ALIASED_POINT_SIZE_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _ALIASED_POINT_SIZE_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _ALIASED_LINE_WIDTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _ALIASED_LINE_WIDTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _CULL_FACE_MODE_ : cullFaceMode parameter readonly_prop + method _CULL_FACE_MODE_ : cullFaceMode parameter readonly_prop - method _FRONT_FACE_ : frontFaceDir parameter readonly_prop + method _FRONT_FACE_ : frontFaceDir parameter readonly_prop - method _DEPTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _DEPTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _DEPTH_WRITEMASK_ : bool t parameter readonly_prop + method _DEPTH_WRITEMASK_ : bool t parameter readonly_prop - method _DEPTH_CLEAR_VALUE_ : float parameter readonly_prop + method _DEPTH_CLEAR_VALUE_ : float parameter readonly_prop - method _DEPTH_FUNC_ : depthFunction parameter readonly_prop + method _DEPTH_FUNC_ : depthFunction parameter readonly_prop - method _STENCIL_CLEAR_VALUE_ : int parameter readonly_prop + method _STENCIL_CLEAR_VALUE_ : int parameter readonly_prop - method _STENCIL_FUNC_ : int parameter readonly_prop + method _STENCIL_FUNC_ : int parameter readonly_prop - method _STENCIL_FAIL_ : int parameter readonly_prop + method _STENCIL_FAIL_ : int parameter readonly_prop - method _STENCIL_PASS_DEPTH_FAIL_ : int parameter readonly_prop + method _STENCIL_PASS_DEPTH_FAIL_ : int parameter readonly_prop - method _STENCIL_PASS_DEPTH_PASS_ : int parameter readonly_prop + method _STENCIL_PASS_DEPTH_PASS_ : int parameter readonly_prop - method _STENCIL_REF_ : int parameter readonly_prop + method _STENCIL_REF_ : int parameter readonly_prop - method _STENCIL_VALUE_MASK_ : int parameter readonly_prop + method _STENCIL_VALUE_MASK_ : int parameter readonly_prop - method _STENCIL_WRITEMASK_ : int parameter readonly_prop + method _STENCIL_WRITEMASK_ : int parameter readonly_prop - method _STENCIL_BACK_FUNC_ : int parameter readonly_prop + method _STENCIL_BACK_FUNC_ : int parameter readonly_prop - method _STENCIL_BACK_FAIL_ : int parameter readonly_prop + method _STENCIL_BACK_FAIL_ : int parameter readonly_prop - method _STENCIL_BACK_PASS_DEPTH_FAIL_ : int parameter readonly_prop + method _STENCIL_BACK_PASS_DEPTH_FAIL_ : int parameter readonly_prop - method _STENCIL_BACK_PASS_DEPTH_PASS_ : int parameter readonly_prop + method _STENCIL_BACK_PASS_DEPTH_PASS_ : int parameter readonly_prop - method _STENCIL_BACK_REF_ : int parameter readonly_prop + method _STENCIL_BACK_REF_ : int parameter readonly_prop - method _STENCIL_BACK_VALUE_MASK_ : int parameter readonly_prop + method _STENCIL_BACK_VALUE_MASK_ : int parameter readonly_prop - method _STENCIL_BACK_WRITEMASK_ : int parameter readonly_prop + method _STENCIL_BACK_WRITEMASK_ : int parameter readonly_prop - method _VIEWPORT : Typed_array.int32Array t parameter readonly_prop + method _VIEWPORT : Typed_array.int32Array t parameter readonly_prop - method _SCISSOR_BOX_ : Typed_array.int32Array t parameter readonly_prop + method _SCISSOR_BOX_ : Typed_array.int32Array t parameter readonly_prop - method _COLOR_CLEAR_VALUE_ : Typed_array.float32Array t parameter readonly_prop + method _COLOR_CLEAR_VALUE_ : Typed_array.float32Array t parameter readonly_prop - method _COLOR_WRITEMASK_ : bool t js_array t parameter readonly_prop + method _COLOR_WRITEMASK_ : bool t js_array t parameter readonly_prop - method _UNPACK_ALIGNMENT_PARAM : int parameter readonly_prop + method _UNPACK_ALIGNMENT_PARAM : int parameter readonly_prop - method _PACK_ALIGNMENT_ : int parameter readonly_prop + method _PACK_ALIGNMENT_ : int parameter readonly_prop - method _MAX_TEXTURE_SIZE_ : int parameter readonly_prop + method _MAX_TEXTURE_SIZE_ : int parameter readonly_prop - method _MAX_VIEWPORT_DIMS_ : Typed_array.int32Array t parameter readonly_prop + method _MAX_VIEWPORT_DIMS_ : Typed_array.int32Array t parameter readonly_prop - method _SUBPIXEL_BITS_ : int parameter readonly_prop + method _SUBPIXEL_BITS_ : int parameter readonly_prop - method _RED_BITS_ : int parameter readonly_prop + method _RED_BITS_ : int parameter readonly_prop - method _GREEN_BITS_ : int parameter readonly_prop + method _GREEN_BITS_ : int parameter readonly_prop - method _BLUE_BITS_ : int parameter readonly_prop + method _BLUE_BITS_ : int parameter readonly_prop - method _ALPHA_BITS_ : int parameter readonly_prop + method _ALPHA_BITS_ : int parameter readonly_prop - method _DEPTH_BITS_ : int parameter readonly_prop + method _DEPTH_BITS_ : int parameter readonly_prop - method _STENCIL_BITS_ : int parameter readonly_prop + method _STENCIL_BITS_ : int parameter readonly_prop - method _POLYGON_OFFSET_UNITS_ : float parameter readonly_prop + method _POLYGON_OFFSET_UNITS_ : float parameter readonly_prop - method _POLYGON_OFFSET_FACTOR_ : float parameter readonly_prop + method _POLYGON_OFFSET_FACTOR_ : float parameter readonly_prop - method _TEXTURE_BINDING_2D_ : texture t opt parameter readonly_prop + method _TEXTURE_BINDING_2D_ : texture t opt parameter readonly_prop - method _TEXTURE_BINDING_CUBE_MAP_ : texture t opt parameter readonly_prop + method _TEXTURE_BINDING_CUBE_MAP_ : texture t opt parameter readonly_prop - method _SAMPLE_BUFFERS_ : int parameter readonly_prop + method _SAMPLE_BUFFERS_ : int parameter readonly_prop - method _SAMPLES_ : int parameter readonly_prop + method _SAMPLES_ : int parameter readonly_prop - method _SAMPLE_COVERAGE_VALUE_ : float parameter readonly_prop + method _SAMPLE_COVERAGE_VALUE_ : float parameter readonly_prop - method _SAMPLE_COVERAGE_INVERT_ : bool t parameter readonly_prop + method _SAMPLE_COVERAGE_INVERT_ : bool t parameter readonly_prop - method _NUM_COMPRESSED_TEXTURE_FORMATS_ : int parameter readonly_prop + method _NUM_COMPRESSED_TEXTURE_FORMATS_ : int parameter readonly_prop - method _COMPRESSED_TEXTURE_FORMATS_ : - Typed_array.uint32Array t parameter readonly_prop + method _COMPRESSED_TEXTURE_FORMATS_ : Typed_array.uint32Array t parameter readonly_prop - method _GENERATE_MIPMAP_HINT_PARAM_ : hintMode parameter readonly_prop + method _GENERATE_MIPMAP_HINT_PARAM_ : hintMode parameter readonly_prop - method _BUFFER_SIZE_ : int bufferParameter readonly_prop + method _BUFFER_SIZE_ : int bufferParameter readonly_prop - method _BUFFER_USAGE_ : bufferUsage bufferParameter readonly_prop + method _BUFFER_USAGE_ : bufferUsage bufferParameter readonly_prop - method _BYTE : dataType readonly_prop + method _BYTE : dataType readonly_prop - method _UNSIGNED_BYTE_DT : dataType readonly_prop + method _UNSIGNED_BYTE_DT : dataType readonly_prop - method _SHORT : dataType readonly_prop + method _SHORT : dataType readonly_prop - method _UNSIGNED_SHORT_ : dataType readonly_prop + method _UNSIGNED_SHORT_ : dataType readonly_prop - method _INT : dataType readonly_prop + method _INT : dataType readonly_prop - method _UNSIGNED_INT_ : dataType readonly_prop + method _UNSIGNED_INT_ : dataType readonly_prop - method _FLOAT : dataType readonly_prop + method _FLOAT : dataType readonly_prop - method _UNSIGNED_BYTE_ : pixelType readonly_prop + method _UNSIGNED_BYTE_ : pixelType readonly_prop - method _UNSIGNED_SHORT_4_4_4_4_ : pixelType readonly_prop + method _UNSIGNED_SHORT_4_4_4_4_ : pixelType readonly_prop - method _UNSIGNED_SHORT_5_5_5_1_ : pixelType readonly_prop + method _UNSIGNED_SHORT_5_5_5_1_ : pixelType readonly_prop - method _UNSIGNED_SHORT_5_6_5_ : pixelType readonly_prop + method _UNSIGNED_SHORT_5_6_5_ : pixelType readonly_prop - method _ALPHA : pixelFormat readonly_prop + method _ALPHA : pixelFormat readonly_prop - method _RGB : pixelFormat readonly_prop + method _RGB : pixelFormat readonly_prop - method _RGBA : pixelFormat readonly_prop + method _RGBA : pixelFormat readonly_prop - method _LUMINANCE : pixelFormat readonly_prop + method _LUMINANCE : pixelFormat readonly_prop - method _LUMINANCE_ALPHA_ : pixelFormat readonly_prop + method _LUMINANCE_ALPHA_ : pixelFormat readonly_prop - method _STENCIL_INDEX_ : pixelFormat readonly_prop + method _STENCIL_INDEX_ : pixelFormat readonly_prop - method _DEPTH_STENCIL_ : pixelFormat readonly_prop + method _DEPTH_STENCIL_ : pixelFormat readonly_prop - method _DEPTH_COMPONENT_ : pixelFormat readonly_prop + method _DEPTH_COMPONENT_ : pixelFormat readonly_prop - method _FRAGMENT_SHADER_ : shaderType readonly_prop + method _FRAGMENT_SHADER_ : shaderType readonly_prop - method _VERTEX_SHADER_ : shaderType readonly_prop + method _VERTEX_SHADER_ : shaderType readonly_prop - method _MAX_VERTEX_ATTRIBS_ : int parameter readonly_prop + method _MAX_VERTEX_ATTRIBS_ : int parameter readonly_prop - method _MAX_VERTEX_UNIFORM_VECTORS_ : int parameter readonly_prop + method _MAX_VERTEX_UNIFORM_VECTORS_ : int parameter readonly_prop - method _MAX_VARYING_VECTORS_ : int parameter readonly_prop + method _MAX_VARYING_VECTORS_ : int parameter readonly_prop - method _MAX_COMBINED_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_COMBINED_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_VERTEX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_VERTEX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_FRAGMENT_UNIFORM_VECTORS_ : int parameter readonly_prop + method _MAX_FRAGMENT_UNIFORM_VECTORS_ : int parameter readonly_prop - method _SHADER_TYPE_ : shaderType shaderParam readonly_prop + method _SHADER_TYPE_ : shaderType shaderParam readonly_prop - method _DELETE_STATUS_ : bool t shaderParam readonly_prop + method _DELETE_STATUS_ : bool t shaderParam readonly_prop - method _COMPILE_STATUS_ : bool t shaderParam readonly_prop + method _COMPILE_STATUS_ : bool t shaderParam readonly_prop - method _DELETE_STATUS_PROG : bool t programParam readonly_prop + method _DELETE_STATUS_PROG : bool t programParam readonly_prop - method _LINK_STATUS_ : bool t programParam readonly_prop + method _LINK_STATUS_ : bool t programParam readonly_prop - method _VALIDATE_STATUS_ : bool t programParam readonly_prop + method _VALIDATE_STATUS_ : bool t programParam readonly_prop - method _ATTACHED_SHADERS_ : int programParam readonly_prop + method _ATTACHED_SHADERS_ : int programParam readonly_prop - method _ACTIVE_UNIFORMS_ : int programParam readonly_prop + method _ACTIVE_UNIFORMS_ : int programParam readonly_prop - method _ACTIVE_ATTRIBUTES_ : int programParam readonly_prop + method _ACTIVE_ATTRIBUTES_ : int programParam readonly_prop - method _SHADING_LANGUAGE_VERSION_ : js_string t parameter readonly_prop + method _SHADING_LANGUAGE_VERSION_ : js_string t parameter readonly_prop - method _CURRENT_PROGRAM_ : program t opt parameter readonly_prop + method _CURRENT_PROGRAM_ : program t opt parameter readonly_prop - method _VENDOR : js_string t parameter readonly_prop + method _VENDOR : js_string t parameter readonly_prop - method _RENDERER : js_string t parameter readonly_prop + method _RENDERER : js_string t parameter readonly_prop - method _VERSION : js_string t parameter readonly_prop + method _VERSION : js_string t parameter readonly_prop - method _MAX_CUBE_MAP_TEXTURE_SIZE_ : int parameter readonly_prop + method _MAX_CUBE_MAP_TEXTURE_SIZE_ : int parameter readonly_prop - method _ACTIVE_TEXTURE_ : int parameter readonly_prop + method _ACTIVE_TEXTURE_ : int parameter readonly_prop - method _FRAMEBUFFER_BINDING_ : framebuffer t opt parameter readonly_prop + method _FRAMEBUFFER_BINDING_ : framebuffer t opt parameter readonly_prop - method _RENDERBUFFER_BINDING_ : renderbuffer t opt parameter readonly_prop + method _RENDERBUFFER_BINDING_ : renderbuffer t opt parameter readonly_prop - method _MAX_RENDERBUFFER_SIZE : int parameter readonly_prop + method _MAX_RENDERBUFFER_SIZE : int parameter readonly_prop - method _NEVER : depthFunction readonly_prop + method _NEVER : depthFunction readonly_prop - method _LESS : depthFunction readonly_prop + method _LESS : depthFunction readonly_prop - method _EQUAL : depthFunction readonly_prop + method _EQUAL : depthFunction readonly_prop - method _LEQUAL : depthFunction readonly_prop + method _LEQUAL : depthFunction readonly_prop - method _GREATER : depthFunction readonly_prop + method _GREATER : depthFunction readonly_prop - method _NOTEQUAL : depthFunction readonly_prop + method _NOTEQUAL : depthFunction readonly_prop - method _GEQUAL : depthFunction readonly_prop + method _GEQUAL : depthFunction readonly_prop - method _ALWAYS : depthFunction readonly_prop + method _ALWAYS : depthFunction readonly_prop - method _KEEP : stencilOp readonly_prop + method _KEEP : stencilOp readonly_prop - method _REPLACE : stencilOp readonly_prop + method _REPLACE : stencilOp readonly_prop - method _INCR : stencilOp readonly_prop + method _INCR : stencilOp readonly_prop - method _DECR : stencilOp readonly_prop + method _DECR : stencilOp readonly_prop - method _INVERT : stencilOp readonly_prop + method _INVERT : stencilOp readonly_prop - method _INCR_WRAP_ : stencilOp readonly_prop + method _INCR_WRAP_ : stencilOp readonly_prop - method _DECR_WRAP_ : stencilOp readonly_prop + method _DECR_WRAP_ : stencilOp readonly_prop - method _ZERO_ : stencilOp readonly_prop + method _ZERO_ : stencilOp readonly_prop - method _NEAREST : texFilter readonly_prop + method _NEAREST : texFilter readonly_prop - method _LINEAR : texFilter readonly_prop + method _LINEAR : texFilter readonly_prop - method _NEAREST_MIPMAP_NEAREST_ : texFilter readonly_prop + method _NEAREST_MIPMAP_NEAREST_ : texFilter readonly_prop - method _LINEAR_MIPMAP_NEAREST_ : texFilter readonly_prop + method _LINEAR_MIPMAP_NEAREST_ : texFilter readonly_prop - method _NEAREST_MIPMAP_LINEAR_ : texFilter readonly_prop + method _NEAREST_MIPMAP_LINEAR_ : texFilter readonly_prop - method _LINEAR_MIPMAP_LINEAR_ : texFilter readonly_prop + method _LINEAR_MIPMAP_LINEAR_ : texFilter readonly_prop - method _TEXTURE_MAG_FILTER_ : texFilter texParam readonly_prop + method _TEXTURE_MAG_FILTER_ : texFilter texParam readonly_prop - method _TEXTURE_MIN_FILTER_ : texFilter texParam readonly_prop + method _TEXTURE_MIN_FILTER_ : texFilter texParam readonly_prop - method _TEXTURE_WRAP_S_ : wrapMode texParam readonly_prop + method _TEXTURE_WRAP_S_ : wrapMode texParam readonly_prop - method _TEXTURE_WRAP_T_ : wrapMode texParam readonly_prop + method _TEXTURE_WRAP_T_ : wrapMode texParam readonly_prop - method _NONE_OT : objectType readonly_prop + method _NONE_OT : objectType readonly_prop - method _TEXTURE_OT : objectType readonly_prop + method _TEXTURE_OT : objectType readonly_prop - method _RENDERBUFFER_OT : objectType readonly_prop + method _RENDERBUFFER_OT : objectType readonly_prop - method _TEXTURE_2D_ : texTarget readonly_prop + method _TEXTURE_2D_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_X_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_X_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_X_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_X_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_Y_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_Y_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_Y_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_Y_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_Z_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_Z_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_Z_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_Z_ : texTarget readonly_prop - method _TEXTURE0 : textureUnit readonly_prop + method _TEXTURE0 : textureUnit readonly_prop - method _TEXTURE1 : textureUnit readonly_prop + method _TEXTURE1 : textureUnit readonly_prop - method _TEXTURE2 : textureUnit readonly_prop + method _TEXTURE2 : textureUnit readonly_prop - method _TEXTURE3 : textureUnit readonly_prop + method _TEXTURE3 : textureUnit readonly_prop - method _TEXTURE4 : textureUnit readonly_prop + method _TEXTURE4 : textureUnit readonly_prop - method _TEXTURE5 : textureUnit readonly_prop + method _TEXTURE5 : textureUnit readonly_prop - method _TEXTURE6 : textureUnit readonly_prop + method _TEXTURE6 : textureUnit readonly_prop - method _TEXTURE7 : textureUnit readonly_prop + method _TEXTURE7 : textureUnit readonly_prop - method _TEXTURE8 : textureUnit readonly_prop + method _TEXTURE8 : textureUnit readonly_prop - method _TEXTURE9 : textureUnit readonly_prop + method _TEXTURE9 : textureUnit readonly_prop - method _TEXTURE10 : textureUnit readonly_prop + method _TEXTURE10 : textureUnit readonly_prop - method _TEXTURE11 : textureUnit readonly_prop + method _TEXTURE11 : textureUnit readonly_prop - method _TEXTURE12 : textureUnit readonly_prop + method _TEXTURE12 : textureUnit readonly_prop - method _TEXTURE13 : textureUnit readonly_prop + method _TEXTURE13 : textureUnit readonly_prop - method _TEXTURE14 : textureUnit readonly_prop + method _TEXTURE14 : textureUnit readonly_prop - method _TEXTURE15 : textureUnit readonly_prop + method _TEXTURE15 : textureUnit readonly_prop - method _TEXTURE16 : textureUnit readonly_prop + method _TEXTURE16 : textureUnit readonly_prop - method _TEXTURE17 : textureUnit readonly_prop + method _TEXTURE17 : textureUnit readonly_prop - method _TEXTURE18 : textureUnit readonly_prop + method _TEXTURE18 : textureUnit readonly_prop - method _TEXTURE19 : textureUnit readonly_prop + method _TEXTURE19 : textureUnit readonly_prop - method _TEXTURE20 : textureUnit readonly_prop + method _TEXTURE20 : textureUnit readonly_prop - method _TEXTURE21 : textureUnit readonly_prop + method _TEXTURE21 : textureUnit readonly_prop - method _TEXTURE22 : textureUnit readonly_prop + method _TEXTURE22 : textureUnit readonly_prop - method _TEXTURE23 : textureUnit readonly_prop + method _TEXTURE23 : textureUnit readonly_prop - method _TEXTURE24 : textureUnit readonly_prop + method _TEXTURE24 : textureUnit readonly_prop - method _TEXTURE25 : textureUnit readonly_prop + method _TEXTURE25 : textureUnit readonly_prop - method _TEXTURE26 : textureUnit readonly_prop + method _TEXTURE26 : textureUnit readonly_prop - method _TEXTURE27 : textureUnit readonly_prop + method _TEXTURE27 : textureUnit readonly_prop - method _TEXTURE28 : textureUnit readonly_prop + method _TEXTURE28 : textureUnit readonly_prop - method _TEXTURE29 : textureUnit readonly_prop + method _TEXTURE29 : textureUnit readonly_prop - method _TEXTURE30 : textureUnit readonly_prop + method _TEXTURE30 : textureUnit readonly_prop - method _TEXTURE31 : textureUnit readonly_prop + method _TEXTURE31 : textureUnit readonly_prop - method _REPEAT : wrapMode readonly_prop + method _REPEAT : wrapMode readonly_prop - method _CLAMP_TO_EDGE_ : wrapMode readonly_prop + method _CLAMP_TO_EDGE_ : wrapMode readonly_prop - method _MIRRORED_REPEAT_ : wrapMode readonly_prop + method _MIRRORED_REPEAT_ : wrapMode readonly_prop - method _FLOAT_ : uniformType readonly_prop + method _FLOAT_ : uniformType readonly_prop - method _FLOAT_VEC2_ : uniformType readonly_prop + method _FLOAT_VEC2_ : uniformType readonly_prop - method _FLOAT_VEC3_ : uniformType readonly_prop + method _FLOAT_VEC3_ : uniformType readonly_prop - method _FLOAT_VEC4_ : uniformType readonly_prop + method _FLOAT_VEC4_ : uniformType readonly_prop - method _INT_ : uniformType readonly_prop + method _INT_ : uniformType readonly_prop - method _INT_VEC2_ : uniformType readonly_prop + method _INT_VEC2_ : uniformType readonly_prop - method _INT_VEC3_ : uniformType readonly_prop + method _INT_VEC3_ : uniformType readonly_prop - method _INT_VEC4_ : uniformType readonly_prop + method _INT_VEC4_ : uniformType readonly_prop - method _BOOL_ : uniformType readonly_prop + method _BOOL_ : uniformType readonly_prop - method _BOOL_VEC2_ : uniformType readonly_prop + method _BOOL_VEC2_ : uniformType readonly_prop - method _BOOL_VEC3_ : uniformType readonly_prop + method _BOOL_VEC3_ : uniformType readonly_prop - method _BOOL_VEC4_ : uniformType readonly_prop + method _BOOL_VEC4_ : uniformType readonly_prop - method _FLOAT_MAT2_ : uniformType readonly_prop + method _FLOAT_MAT2_ : uniformType readonly_prop - method _FLOAT_MAT3_ : uniformType readonly_prop + method _FLOAT_MAT3_ : uniformType readonly_prop - method _FLOAT_MAT4_ : uniformType readonly_prop + method _FLOAT_MAT4_ : uniformType readonly_prop - method _SAMPLER_2D_ : uniformType readonly_prop + method _SAMPLER_2D_ : uniformType readonly_prop - method _SAMPLER_CUBE_ : uniformType readonly_prop + method _SAMPLER_CUBE_ : uniformType readonly_prop - method _VERTEX_ATTRIB_ARRAY_ENABLED_ : bool t vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_ENABLED_ : bool t vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_SIZE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_SIZE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_STRIDE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_STRIDE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_TYPE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_TYPE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_NORMALIZED_ : bool t vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_NORMALIZED_ : bool t vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_POINTER_ : vertexAttribPointerParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_POINTER_ : vertexAttribPointerParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ : - buffer t opt vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ : + buffer t opt vertexAttribParam readonly_prop - method _CURRENT_VERTEX_ATTRIB_ : - Typed_array.float32Array t vertexAttribParam readonly_prop + method _CURRENT_VERTEX_ATTRIB_ : + Typed_array.float32Array t vertexAttribParam readonly_prop - method _LOW_FLOAT_ : shaderPrecisionType readonly_prop + method _LOW_FLOAT_ : shaderPrecisionType readonly_prop - method _MEDIUM_FLOAT_ : shaderPrecisionType readonly_prop + method _MEDIUM_FLOAT_ : shaderPrecisionType readonly_prop - method _HIGH_FLOAT_ : shaderPrecisionType readonly_prop + method _HIGH_FLOAT_ : shaderPrecisionType readonly_prop - method _LOW_INT_ : shaderPrecisionType readonly_prop + method _LOW_INT_ : shaderPrecisionType readonly_prop - method _MEDIUM_INT_ : shaderPrecisionType readonly_prop + method _MEDIUM_INT_ : shaderPrecisionType readonly_prop - method _HIGH_INT_ : shaderPrecisionType readonly_prop + method _HIGH_INT_ : shaderPrecisionType readonly_prop - method _FRAMEBUFFER : fbTarget readonly_prop + method _FRAMEBUFFER : fbTarget readonly_prop - method _RENDERBUFFER : rbTarget readonly_prop + method _RENDERBUFFER : rbTarget readonly_prop - method _RGBA4 : format readonly_prop + method _RGBA4 : format readonly_prop - method _RGB5_A1_ : format readonly_prop + method _RGB5_A1_ : format readonly_prop - method _RGB565 : format readonly_prop + method _RGB565 : format readonly_prop - method _DEPTH_COMPONENT16_ : format readonly_prop + method _DEPTH_COMPONENT16_ : format readonly_prop - method _STENCIL_INDEX8_ : format readonly_prop + method _STENCIL_INDEX8_ : format readonly_prop - method _RENDERBUFFER_WIDTH_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_WIDTH_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_HEIGHT_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_HEIGHT_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_INTERNAL_FORMAT_ : format renderbufferParam readonly_prop + method _RENDERBUFFER_INTERNAL_FORMAT_ : format renderbufferParam readonly_prop - method _RENDERBUFFER_RED_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_RED_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_GREEN_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_GREEN_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_BLUE_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_BLUE_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_ALPHA_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_ALPHA_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_DEPTH_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_DEPTH_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_STENCIL_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_STENCIL_SIZE_ : int renderbufferParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_ : objectType attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_ : objectType attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_RENDERBUFFER : - renderbuffer t attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_RENDERBUFFER : + renderbuffer t attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_TEXTURE : - texture t attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_TEXTURE : + texture t attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_ : int attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_ : int attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_ : int attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_ : int attachParam readonly_prop - method _COLOR_ATTACHMENT0_ : attachmentPoint readonly_prop + method _COLOR_ATTACHMENT0_ : attachmentPoint readonly_prop - method _DEPTH_ATTACHMENT_ : attachmentPoint readonly_prop + method _DEPTH_ATTACHMENT_ : attachmentPoint readonly_prop - method _STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop + method _STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop - method _DEPTH_STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop + method _DEPTH_STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop - method _FRAMEBUFFER_COMPLETE_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_COMPLETE_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_ATTACHMENT_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_ATTACHMENT_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_DIMENSIONS_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_DIMENSIONS_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_UNSUPPORTED_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_UNSUPPORTED_ : framebufferStatus readonly_prop - method _UNPACK_FLIP_Y_WEBGL_PARAM : bool t parameter readonly_prop + method _UNPACK_FLIP_Y_WEBGL_PARAM : bool t parameter readonly_prop - method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_PARAM : bool t parameter readonly_prop + method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_PARAM : bool t parameter readonly_prop - method _UNPACK_COLORSPACE_CONVERSION_WEBGL_PARAM : - colorspaceConversion parameter readonly_prop + method _UNPACK_COLORSPACE_CONVERSION_WEBGL_PARAM : + colorspaceConversion parameter readonly_prop - method _NONE : colorspaceConversion readonly_prop + method _NONE : colorspaceConversion readonly_prop - method _BROWSER_DEFAULT_WEBGL_ : colorspaceConversion readonly_prop + method _BROWSER_DEFAULT_WEBGL_ : colorspaceConversion readonly_prop - method _UNPACK_ALIGNMENT_ : int pixelStoreParam readonly_prop + method _UNPACK_ALIGNMENT_ : int pixelStoreParam readonly_prop - method _UNPACK_FLIP_Y_WEBGL_ : bool t pixelStoreParam readonly_prop + method _UNPACK_FLIP_Y_WEBGL_ : bool t pixelStoreParam readonly_prop - method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_ : bool t pixelStoreParam readonly_prop + method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_ : bool t pixelStoreParam readonly_prop - method _UNPACK_COLORSPACE_CONVERSION_WEBGL_ : int pixelStoreParam readonly_prop - end + method _UNPACK_COLORSPACE_CONVERSION_WEBGL_ : int pixelStoreParam readonly_prop +end (** 5.14 WebGLContextEvent *) -class type contextEvent = - object - inherit Dom_html.event +class type contextEvent = object + inherit Dom_html.event - method statusMessage : js_string t readonly_prop - end + method statusMessage : js_string t readonly_prop +end module Event = struct let webglcontextlost = Dom_html.Event.make "webglcontextlost" @@ -1362,12 +1356,11 @@ end (****) -class type canvasElement = - object - method getContext : js_string t -> renderingContext t opt meth +class type canvasElement = object + method getContext : js_string t -> renderingContext t opt meth - method getContext_ : js_string t -> contextAttributes t -> renderingContext t opt meth - end + method getContext_ : js_string t -> contextAttributes t -> renderingContext t opt meth +end let getContext (c : Dom_html.canvasElement t) = let c : canvasElement t = Js.Unsafe.coerce c in diff --git a/lib/js_of_ocaml/webGL.mli b/lib/js_of_ocaml/webGL.mli index a5c258a352..4775bcc142 100644 --- a/lib/js_of_ocaml/webGL.mli +++ b/lib/js_of_ocaml/webGL.mli @@ -121,24 +121,23 @@ type shaderPrecisionType type objectType (** 5.2 WebGLContextAttributes *) -class type contextAttributes = - object - method alpha : bool t prop +class type contextAttributes = object + method alpha : bool t prop - method depth : bool t prop + method depth : bool t prop - method stencil : bool t prop + method stencil : bool t prop - method antialias : bool t prop + method antialias : bool t prop - method premultipliedAlpha : bool t prop + method premultipliedAlpha : bool t prop - method preserveDrawingBuffer : bool t prop + method preserveDrawingBuffer : bool t prop - method preferLowPowerToHighPerformance : bool t prop + method preferLowPowerToHighPerformance : bool t prop - method failIfMajorPerformanceCaveat : bool t prop - end + method failIfMajorPerformanceCaveat : bool t prop +end val defaultContextAttributes : contextAttributes t @@ -156,1191 +155,1186 @@ type texture type 'a uniformLocation -class type activeInfo = - object - method size : int readonly_prop - - method _type : uniformType readonly_prop +class type activeInfo = object + method size : int readonly_prop - method name : js_string t readonly_prop - end + method _type : uniformType readonly_prop -class type shaderPrecisionFormat = - object - method rangeMin : int readonly_prop + method name : js_string t readonly_prop +end - method rangeMax : int readonly_prop +class type shaderPrecisionFormat = object + method rangeMin : int readonly_prop - method precision : int readonly_prop - end + method rangeMax : int readonly_prop -class type renderingContext = - object + method precision : int readonly_prop +end - (** 5.13.1 Attributes *) +class type renderingContext = object + +(** 5.13.1 Attributes *) - method canvas : Dom_html.canvasElement t readonly_prop + method canvas : Dom_html.canvasElement t readonly_prop - method drawingBufferWidth : sizei readonly_prop + method drawingBufferWidth : sizei readonly_prop - method drawingBufferHeight : sizei readonly_prop + method drawingBufferHeight : sizei readonly_prop - (** 5.13.2 Getting information about the context *) + (** 5.13.2 Getting information about the context *) - method getContextAttributes : contextAttributes t meth + method getContextAttributes : contextAttributes t meth - (** 5.13.3 Setting and getting state *) + (** 5.13.3 Setting and getting state *) - method activeTexture : textureUnit -> unit meth + method activeTexture : textureUnit -> unit meth - method blendColor : clampf -> clampf -> clampf -> clampf -> unit meth + method blendColor : clampf -> clampf -> clampf -> clampf -> unit meth - method blendEquation : blendMode -> unit meth + method blendEquation : blendMode -> unit meth - method blendEquationSeparate : blendMode -> blendMode -> unit meth + method blendEquationSeparate : blendMode -> blendMode -> unit meth - method blendFunc : blendingFactor -> blendingFactor -> unit meth + method blendFunc : blendingFactor -> blendingFactor -> unit meth - method blendFuncSeparate : - blendingFactor -> blendingFactor -> blendingFactor -> blendingFactor -> unit meth + method blendFuncSeparate : + blendingFactor -> blendingFactor -> blendingFactor -> blendingFactor -> unit meth - method clearColor : clampf -> clampf -> clampf -> clampf -> unit meth + method clearColor : clampf -> clampf -> clampf -> clampf -> unit meth - method clearDepth : clampf -> unit meth + method clearDepth : clampf -> unit meth - method clearStencil : int -> unit meth + method clearStencil : int -> unit meth - method colorMask : bool t -> bool t -> bool t -> bool t -> unit meth + method colorMask : bool t -> bool t -> bool t -> bool t -> unit meth - method cullFace : cullFaceMode -> unit meth + method cullFace : cullFaceMode -> unit meth - method depthFunc : depthFunction -> unit meth + method depthFunc : depthFunction -> unit meth - method depthMask : bool t -> unit meth + method depthMask : bool t -> unit meth - method depthRange : clampf -> clampf -> unit meth + method depthRange : clampf -> clampf -> unit meth - method disable : enableCap -> unit meth + method disable : enableCap -> unit meth - method enable : enableCap -> unit meth + method enable : enableCap -> unit meth - method frontFace : frontFaceDir -> unit meth + method frontFace : frontFaceDir -> unit meth - method getParameter : 'a. 'a parameter -> 'a meth + method getParameter : 'a. 'a parameter -> 'a meth - method getError : errorCode meth + method getError : errorCode meth - method hint : hintTarget -> hintMode -> unit meth + method hint : hintTarget -> hintMode -> unit meth - method isEnabled : enableCap -> bool t meth + method isEnabled : enableCap -> bool t meth - method lineWidth : float -> unit meth + method lineWidth : float -> unit meth - method pixelStorei : 'a. 'a pixelStoreParam -> 'a -> unit meth + method pixelStorei : 'a. 'a pixelStoreParam -> 'a -> unit meth - method polygonOffset : float -> float -> unit meth + method polygonOffset : float -> float -> unit meth - method sampleCoverage : clampf -> bool t -> unit meth + method sampleCoverage : clampf -> bool t -> unit meth - method stencilFunc : depthFunction -> int -> uint -> unit meth + method stencilFunc : depthFunction -> int -> uint -> unit meth - method stencilFuncSeparate : cullFaceMode -> depthFunction -> int -> uint -> unit meth + method stencilFuncSeparate : cullFaceMode -> depthFunction -> int -> uint -> unit meth - method stencilMask : uint -> unit meth + method stencilMask : uint -> unit meth - method stencilMaskSeparate : cullFaceMode -> uint -> unit meth + method stencilMaskSeparate : cullFaceMode -> uint -> unit meth - method stencilOp : stencilOp -> stencilOp -> stencilOp -> unit meth + method stencilOp : stencilOp -> stencilOp -> stencilOp -> unit meth - method stencilOpSeparate : - cullFaceMode -> stencilOp -> stencilOp -> stencilOp -> unit meth + method stencilOpSeparate : + cullFaceMode -> stencilOp -> stencilOp -> stencilOp -> unit meth - (** 5.13.4 Viewing and clipping *) + (** 5.13.4 Viewing and clipping *) - method scissor : int -> int -> sizei -> sizei -> unit meth + method scissor : int -> int -> sizei -> sizei -> unit meth - method viewport : int -> int -> sizei -> sizei -> unit meth + method viewport : int -> int -> sizei -> sizei -> unit meth - (** 5.13.5 Buffer objects *) + (** 5.13.5 Buffer objects *) - method bindBuffer : bufferTarget -> buffer t -> unit meth + method bindBuffer : bufferTarget -> buffer t -> unit meth - method bindBuffer_ : bufferTarget -> buffer t opt -> unit meth + method bindBuffer_ : bufferTarget -> buffer t opt -> unit meth - method bufferData_create : bufferTarget -> sizeiptr -> bufferUsage -> unit meth + method bufferData_create : bufferTarget -> sizeiptr -> bufferUsage -> unit meth - method bufferData : - bufferTarget -> #Typed_array.arrayBufferView t -> bufferUsage -> unit meth + method bufferData : + bufferTarget -> #Typed_array.arrayBufferView t -> bufferUsage -> unit meth - method bufferData_raw : - bufferTarget -> Typed_array.arrayBuffer t -> bufferUsage -> unit meth + method bufferData_raw : + bufferTarget -> Typed_array.arrayBuffer t -> bufferUsage -> unit meth - method bufferSubData : - bufferTarget -> intptr -> #Typed_array.arrayBufferView t -> unit meth + method bufferSubData : + bufferTarget -> intptr -> #Typed_array.arrayBufferView t -> unit meth - method bufferSubData_raw : - bufferTarget -> intptr -> Typed_array.arrayBuffer t -> unit meth + method bufferSubData_raw : + bufferTarget -> intptr -> Typed_array.arrayBuffer t -> unit meth - method createBuffer : buffer t meth + method createBuffer : buffer t meth - method deleteBuffer : buffer t -> unit meth + method deleteBuffer : buffer t -> unit meth - method getBufferParameter : 'a. bufferTarget -> 'a bufferParameter -> 'a meth + method getBufferParameter : 'a. bufferTarget -> 'a bufferParameter -> 'a meth - method isBuffer : buffer t -> bool t meth + method isBuffer : buffer t -> bool t meth - (** 5.13.6 Framebuffer objects *) + (** 5.13.6 Framebuffer objects *) - method bindFramebuffer : fbTarget -> framebuffer t -> unit meth + method bindFramebuffer : fbTarget -> framebuffer t -> unit meth - method bindFramebuffer_ : fbTarget -> framebuffer t opt -> unit meth + method bindFramebuffer_ : fbTarget -> framebuffer t opt -> unit meth - method checkFramebufferStatus : fbTarget -> framebufferStatus meth + method checkFramebufferStatus : fbTarget -> framebufferStatus meth - method createFramebuffer : framebuffer t meth + method createFramebuffer : framebuffer t meth - method deleteFramebuffer : framebuffer t -> unit meth + method deleteFramebuffer : framebuffer t -> unit meth - method framebufferRenderbuffer : - fbTarget -> attachmentPoint -> rbTarget -> renderbuffer t -> unit meth + method framebufferRenderbuffer : + fbTarget -> attachmentPoint -> rbTarget -> renderbuffer t -> unit meth - method framebufferTexture2D : - fbTarget -> attachmentPoint -> texTarget -> texture t -> int -> unit meth + method framebufferTexture2D : + fbTarget -> attachmentPoint -> texTarget -> texture t -> int -> unit meth - method getFramebufferAttachmentParameter : - 'a. fbTarget -> attachmentPoint -> 'a attachParam -> 'a meth + method getFramebufferAttachmentParameter : + 'a. fbTarget -> attachmentPoint -> 'a attachParam -> 'a meth - method isFramebuffer : framebuffer t -> bool t meth + method isFramebuffer : framebuffer t -> bool t meth - (** 5.13.7 Renderbuffer objects *) + (** 5.13.7 Renderbuffer objects *) - method bindRenderbuffer : rbTarget -> renderbuffer t -> unit meth + method bindRenderbuffer : rbTarget -> renderbuffer t -> unit meth - method bindRenderbuffer_ : rbTarget -> renderbuffer t opt -> unit meth + method bindRenderbuffer_ : rbTarget -> renderbuffer t opt -> unit meth - method createRenderbuffer : renderbuffer t meth + method createRenderbuffer : renderbuffer t meth - method deleteRenderbuffer : renderbuffer t -> unit meth + method deleteRenderbuffer : renderbuffer t -> unit meth - method getRenderbufferParameter : 'a. rbTarget -> 'a renderbufferParam -> 'a meth + method getRenderbufferParameter : 'a. rbTarget -> 'a renderbufferParam -> 'a meth - method isRenderbuffer : renderbuffer t -> bool t meth + method isRenderbuffer : renderbuffer t -> bool t meth - method renderbufferStorage : rbTarget -> format -> sizei -> sizei -> unit meth + method renderbufferStorage : rbTarget -> format -> sizei -> sizei -> unit meth - (** 5.13.8 Texture objects *) + (** 5.13.8 Texture objects *) - method bindTexture : texTarget -> texture t -> unit meth + method bindTexture : texTarget -> texture t -> unit meth - method bindTexture_ : texTarget -> texture t opt -> unit meth + method bindTexture_ : texTarget -> texture t opt -> unit meth - method compressedTexImage2D : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> #Typed_array.arrayBufferView t - -> unit meth + method compressedTexImage2D : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> #Typed_array.arrayBufferView t + -> unit meth - method compressedTexSubImage2D : - texTarget - -> int - -> int - -> int - -> sizei - -> sizei - -> pixelFormat - -> #Typed_array.arrayBufferView t - -> unit meth + method compressedTexSubImage2D : + texTarget + -> int + -> int + -> int + -> sizei + -> sizei + -> pixelFormat + -> #Typed_array.arrayBufferView t + -> unit meth - method copyTexImage2D : - texTarget -> int -> pixelFormat -> int -> int -> sizei -> sizei -> int -> unit meth + method copyTexImage2D : + texTarget -> int -> pixelFormat -> int -> int -> sizei -> sizei -> int -> unit meth - method copyTexSubImage2D : - texTarget -> int -> int -> int -> int -> int -> sizei -> sizei -> unit meth + method copyTexSubImage2D : + texTarget -> int -> int -> int -> int -> int -> sizei -> sizei -> unit meth - method createTexture : texture t meth + method createTexture : texture t meth - method deleteTexture : texture t -> unit meth + method deleteTexture : texture t -> unit meth - method generateMipmap : texTarget -> unit meth - - method getTexParameter : texTarget -> 'a texParam -> 'a meth - - method isTexture : texture t -> bool t meth - - method texImage2D_new : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> pixelFormat - -> pixelType - -> void opt - -> unit meth - - method texImage2D_fromView : - texTarget - -> int - -> pixelFormat - -> sizei - -> sizei - -> int - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth - - method texImage2D_fromImageData : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.imageData t - -> unit meth - - method texImage2D_fromImage : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.imageElement t - -> unit meth - - method texImage2D_fromCanvas : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.canvasElement t - -> unit meth - - method texImage2D_fromVideo : - texTarget - -> int - -> pixelFormat - -> pixelFormat - -> pixelType - -> Dom_html.videoElement t - -> unit meth - - (* {[ - method texParameterf : texTarget -> texParam -> float -> unit meth - ]} - *) - method texParameteri : texTarget -> 'a texParam -> 'a -> unit meth - - method texSubImage2D_fromView : - texTarget - -> int - -> int - -> int - -> sizei - -> sizei - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth - - method texSubImage2D_fromImageData : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.imageData t - -> unit meth + method generateMipmap : texTarget -> unit meth + + method getTexParameter : texTarget -> 'a texParam -> 'a meth + + method isTexture : texture t -> bool t meth + + method texImage2D_new : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> pixelFormat + -> pixelType + -> void opt + -> unit meth + + method texImage2D_fromView : + texTarget + -> int + -> pixelFormat + -> sizei + -> sizei + -> int + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth + + method texImage2D_fromImageData : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.imageData t + -> unit meth + + method texImage2D_fromImage : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.imageElement t + -> unit meth + + method texImage2D_fromCanvas : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.canvasElement t + -> unit meth + + method texImage2D_fromVideo : + texTarget + -> int + -> pixelFormat + -> pixelFormat + -> pixelType + -> Dom_html.videoElement t + -> unit meth + + (* {[ + method texParameterf : texTarget -> texParam -> float -> unit meth + ]} + *) + method texParameteri : texTarget -> 'a texParam -> 'a -> unit meth + + method texSubImage2D_fromView : + texTarget + -> int + -> int + -> int + -> sizei + -> sizei + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth + + method texSubImage2D_fromImageData : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.imageData t + -> unit meth - method texSubImage2D_fromImage : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.imageElement t - -> unit meth + method texSubImage2D_fromImage : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.imageElement t + -> unit meth - method texSubImage2D_fromCanvas : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.canvasElement t - -> unit meth + method texSubImage2D_fromCanvas : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.canvasElement t + -> unit meth - method texSubImage2D_fromVideo : - texTarget - -> int - -> int - -> int - -> pixelFormat - -> pixelType - -> Dom_html.videoElement t - -> unit meth + method texSubImage2D_fromVideo : + texTarget + -> int + -> int + -> int + -> pixelFormat + -> pixelType + -> Dom_html.videoElement t + -> unit meth - (** 5.13.9 Programs and Shaders *) + (** 5.13.9 Programs and Shaders *) - method attachShader : program t -> shader t -> unit meth + method attachShader : program t -> shader t -> unit meth - method bindAttribLocation : program t -> uint -> js_string t -> unit meth + method bindAttribLocation : program t -> uint -> js_string t -> unit meth - method compileShader : shader t -> unit meth + method compileShader : shader t -> unit meth - method createProgram : program t meth + method createProgram : program t meth - method createShader : shaderType -> shader t meth + method createShader : shaderType -> shader t meth - method deleteProgram : program t -> unit meth + method deleteProgram : program t -> unit meth - method deleteShader : shader t -> unit meth + method deleteShader : shader t -> unit meth - method detachShader : program t -> shader t -> unit meth + method detachShader : program t -> shader t -> unit meth - method getAttachedShaders : program t -> shader t js_array t meth + method getAttachedShaders : program t -> shader t js_array t meth - method getProgramParameter : 'a. program t -> 'a programParam -> 'a meth + method getProgramParameter : 'a. program t -> 'a programParam -> 'a meth - method getProgramInfoLog : program t -> js_string t meth + method getProgramInfoLog : program t -> js_string t meth - method getShaderParameter : 'a. shader t -> 'a shaderParam -> 'a meth + method getShaderParameter : 'a. shader t -> 'a shaderParam -> 'a meth - method getShaderPrecisionFormat : - shaderType -> shaderPrecisionType -> shaderPrecisionFormat t meth + method getShaderPrecisionFormat : + shaderType -> shaderPrecisionType -> shaderPrecisionFormat t meth - method getShaderInfoLog : shader t -> js_string t meth + method getShaderInfoLog : shader t -> js_string t meth - method getShaderSource : shader t -> js_string t meth + method getShaderSource : shader t -> js_string t meth - method isProgram : program t -> bool t meth + method isProgram : program t -> bool t meth - method isShader : shader t -> bool t meth + method isShader : shader t -> bool t meth - method linkProgram : program t -> unit meth + method linkProgram : program t -> unit meth - method shaderSource : shader t -> js_string t -> unit meth + method shaderSource : shader t -> js_string t -> unit meth - method useProgram : program t -> unit meth + method useProgram : program t -> unit meth - method validateProgram : program t -> unit meth + method validateProgram : program t -> unit meth - (** 5.13.10 Uniforms and attributes *) + (** 5.13.10 Uniforms and attributes *) - method disableVertexAttribArray : uint -> unit meth + method disableVertexAttribArray : uint -> unit meth - method enableVertexAttribArray : uint -> unit meth + method enableVertexAttribArray : uint -> unit meth - method getActiveAttrib : program t -> uint -> activeInfo t meth + method getActiveAttrib : program t -> uint -> activeInfo t meth - method getActiveUniform : program t -> uint -> activeInfo t meth + method getActiveUniform : program t -> uint -> activeInfo t meth - method getAttribLocation : program t -> js_string t -> int meth + method getAttribLocation : program t -> js_string t -> int meth - method getUniform : 'a 'b. program t -> 'a uniformLocation t -> 'b meth + method getUniform : 'a 'b. program t -> 'a uniformLocation t -> 'b meth - method getUniformLocation : 'a. program t -> js_string t -> 'a uniformLocation t meth + method getUniformLocation : 'a. program t -> js_string t -> 'a uniformLocation t meth - method getVertexAttrib : 'a. uint -> 'a vertexAttribParam -> 'a meth + method getVertexAttrib : 'a. uint -> 'a vertexAttribParam -> 'a meth - method getVertexAttribOffset : uint -> vertexAttribPointerParam -> sizeiptr meth + method getVertexAttribOffset : uint -> vertexAttribPointerParam -> sizeiptr meth - method uniform1f : float uniformLocation t -> float -> unit meth + method uniform1f : float uniformLocation t -> float -> unit meth - method uniform1fv_typed : - float uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform1fv_typed : + float uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform1fv : float uniformLocation t -> float js_array t -> unit meth + method uniform1fv : float uniformLocation t -> float js_array t -> unit meth - method uniform1i : int uniformLocation t -> int -> unit meth + method uniform1i : int uniformLocation t -> int -> unit meth - method uniform1iv_typed : - int uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform1iv_typed : + int uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform1iv : int uniformLocation t -> int js_array t -> unit meth + method uniform1iv : int uniformLocation t -> int js_array t -> unit meth - method uniform2f : [ `vec2 ] uniformLocation t -> float -> float -> unit meth + method uniform2f : [ `vec2 ] uniformLocation t -> float -> float -> unit meth - method uniform2fv_typed : - [ `vec2 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform2fv_typed : + [ `vec2 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform2fv : [ `vec2 ] uniformLocation t -> float js_array t -> unit meth + method uniform2fv : [ `vec2 ] uniformLocation t -> float js_array t -> unit meth - method uniform2i : [ `ivec2 ] uniformLocation t -> int -> int -> unit meth + method uniform2i : [ `ivec2 ] uniformLocation t -> int -> int -> unit meth - method uniform2iv : [ `ivec2 ] uniformLocation t -> int js_array t -> unit meth + method uniform2iv : [ `ivec2 ] uniformLocation t -> int js_array t -> unit meth - method uniform2iv_typed : - [ `ivec2 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform2iv_typed : + [ `ivec2 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform3f : [ `vec3 ] uniformLocation t -> float -> float -> float -> unit meth + method uniform3f : [ `vec3 ] uniformLocation t -> float -> float -> float -> unit meth - method uniform3fv_typed : - [ `vec3 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform3fv_typed : + [ `vec3 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform3fv : [ `vec3 ] uniformLocation t -> float js_array t -> unit meth + method uniform3fv : [ `vec3 ] uniformLocation t -> float js_array t -> unit meth - method uniform3i : [ `ivec3 ] uniformLocation t -> int -> int -> int -> unit meth + method uniform3i : [ `ivec3 ] uniformLocation t -> int -> int -> int -> unit meth - method uniform3iv : [ `ivec3 ] uniformLocation t -> int js_array t -> unit meth + method uniform3iv : [ `ivec3 ] uniformLocation t -> int js_array t -> unit meth - method uniform3iv_typed : - [ `ivec3 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform3iv_typed : + [ `ivec3 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniform4f : - [ `vec4 ] uniformLocation t -> float -> float -> float -> float -> unit meth + method uniform4f : + [ `vec4 ] uniformLocation t -> float -> float -> float -> float -> unit meth - method uniform4fv_typed : - [ `vec4 ] uniformLocation t -> Typed_array.float32Array t -> unit meth + method uniform4fv_typed : + [ `vec4 ] uniformLocation t -> Typed_array.float32Array t -> unit meth - method uniform4fv : [ `vec4 ] uniformLocation t -> float js_array t -> unit meth + method uniform4fv : [ `vec4 ] uniformLocation t -> float js_array t -> unit meth - method uniform4i : - [ `ivec4 ] uniformLocation t -> int -> int -> int -> int -> unit meth + method uniform4i : + [ `ivec4 ] uniformLocation t -> int -> int -> int -> int -> unit meth - method uniform4iv : [ `ivec4 ] uniformLocation t -> int js_array t -> unit meth + method uniform4iv : [ `ivec4 ] uniformLocation t -> int js_array t -> unit meth - method uniform4iv_typed : - [ `ivec4 ] uniformLocation t -> Typed_array.int32Array t -> unit meth + method uniform4iv_typed : + [ `ivec4 ] uniformLocation t -> Typed_array.int32Array t -> unit meth - method uniformMatrix2fv : - [ `mat2 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix2fv : + [ `mat2 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix2fv_typed : - [ `mat2 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix2fv_typed : + [ `mat2 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method uniformMatrix3fv : - [ `mat3 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix3fv : + [ `mat3 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix3fv_typed : - [ `mat3 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix3fv_typed : + [ `mat3 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method uniformMatrix4fv : - [ `mat4 ] uniformLocation t -> bool t -> float js_array t -> unit meth + method uniformMatrix4fv : + [ `mat4 ] uniformLocation t -> bool t -> float js_array t -> unit meth - method uniformMatrix4fv_typed : - [ `mat4 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth + method uniformMatrix4fv_typed : + [ `mat4 ] uniformLocation t -> bool t -> Typed_array.float32Array t -> unit meth - method vertexAttrib1f : uint -> float -> unit meth + method vertexAttrib1f : uint -> float -> unit meth - method vertexAttrib1fv : uint -> float js_array t -> unit meth + method vertexAttrib1fv : uint -> float js_array t -> unit meth - method vertexAttrib1fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib1fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib2f : uint -> float -> float -> unit meth + method vertexAttrib2f : uint -> float -> float -> unit meth - method vertexAttrib2fv : uint -> float js_array t -> unit meth + method vertexAttrib2fv : uint -> float js_array t -> unit meth - method vertexAttrib2fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib2fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib3f : uint -> float -> float -> float -> unit meth + method vertexAttrib3f : uint -> float -> float -> float -> unit meth - method vertexAttrib3fv : uint -> float js_array t -> unit meth + method vertexAttrib3fv : uint -> float js_array t -> unit meth - method vertexAttrib3fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib3fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttrib4f : uint -> float -> float -> float -> float -> unit meth + method vertexAttrib4f : uint -> float -> float -> float -> float -> unit meth - method vertexAttrib4fv : uint -> float js_array t -> unit meth + method vertexAttrib4fv : uint -> float js_array t -> unit meth - method vertexAttrib4fv_typed : uint -> Typed_array.float32Array t -> unit meth + method vertexAttrib4fv_typed : uint -> Typed_array.float32Array t -> unit meth - method vertexAttribPointer : - uint -> int -> dataType -> bool t -> sizei -> intptr -> unit meth + method vertexAttribPointer : + uint -> int -> dataType -> bool t -> sizei -> intptr -> unit meth - (** 5.13.11 Writing to the drawing buffer *) + (** 5.13.11 Writing to the drawing buffer *) - method clear : clearBufferMask -> unit meth + method clear : clearBufferMask -> unit meth - method drawArrays : beginMode -> int -> sizei -> unit meth + method drawArrays : beginMode -> int -> sizei -> unit meth - method drawElements : beginMode -> sizei -> dataType -> intptr -> unit meth + method drawElements : beginMode -> sizei -> dataType -> intptr -> unit meth - method finish : unit meth + method finish : unit meth - method flush : unit meth + method flush : unit meth - (** 5.13.12 Reading back pixels *) + (** 5.13.12 Reading back pixels *) - method readPixels : - int - -> int - -> sizei - -> sizei - -> pixelFormat - -> pixelType - -> #Typed_array.arrayBufferView t - -> unit meth + method readPixels : + int + -> int + -> sizei + -> sizei + -> pixelFormat + -> pixelType + -> #Typed_array.arrayBufferView t + -> unit meth - (** 5.13.13 Detecting context lost events *) + (** 5.13.13 Detecting context lost events *) - method isContextLost : bool t meth + method isContextLost : bool t meth - (** 5.13.14 Detecting and enabling extensions *) + (** 5.13.14 Detecting and enabling extensions *) - method getSupportedExtensions : js_string t js_array t meth + method getSupportedExtensions : js_string t js_array t meth - method getExtension : 'a. js_string t -> 'a t opt meth + method getExtension : 'a. js_string t -> 'a t opt meth - (* Untyped! *) - (** Constants *) + (* Untyped! *) + (** Constants *) - method _DEPTH_BUFFER_BIT_ : clearBufferMask readonly_prop + method _DEPTH_BUFFER_BIT_ : clearBufferMask readonly_prop - method _STENCIL_BUFFER_BIT_ : clearBufferMask readonly_prop + method _STENCIL_BUFFER_BIT_ : clearBufferMask readonly_prop - method _COLOR_BUFFER_BIT_ : clearBufferMask readonly_prop + method _COLOR_BUFFER_BIT_ : clearBufferMask readonly_prop - method _POINTS : beginMode readonly_prop + method _POINTS : beginMode readonly_prop - method _LINES : beginMode readonly_prop + method _LINES : beginMode readonly_prop - method _LINE_LOOP_ : beginMode readonly_prop + method _LINE_LOOP_ : beginMode readonly_prop - method _LINE_STRIP_ : beginMode readonly_prop + method _LINE_STRIP_ : beginMode readonly_prop - method _TRIANGLES : beginMode readonly_prop + method _TRIANGLES : beginMode readonly_prop - method _TRIANGLE_STRIP_ : beginMode readonly_prop + method _TRIANGLE_STRIP_ : beginMode readonly_prop - method _TRIANGLE_FAN_ : beginMode readonly_prop + method _TRIANGLE_FAN_ : beginMode readonly_prop - method _ZERO : blendingFactor readonly_prop + method _ZERO : blendingFactor readonly_prop - method _ONE : blendingFactor readonly_prop + method _ONE : blendingFactor readonly_prop - method _SRC_COLOR_ : blendingFactor readonly_prop + method _SRC_COLOR_ : blendingFactor readonly_prop - method _ONE_MINUS_SRC_COLOR_ : blendingFactor readonly_prop + method _ONE_MINUS_SRC_COLOR_ : blendingFactor readonly_prop - method _SRC_ALPHA_ : blendingFactor readonly_prop + method _SRC_ALPHA_ : blendingFactor readonly_prop - method _ONE_MINUS_SRC_ALPHA_ : blendingFactor readonly_prop + method _ONE_MINUS_SRC_ALPHA_ : blendingFactor readonly_prop - method _DST_ALPHA_ : blendingFactor readonly_prop + method _DST_ALPHA_ : blendingFactor readonly_prop - method _ONE_MINUS_DST_ALPHA_ : blendingFactor readonly_prop + method _ONE_MINUS_DST_ALPHA_ : blendingFactor readonly_prop - method _DST_COLOR_ : blendingFactor readonly_prop + method _DST_COLOR_ : blendingFactor readonly_prop - method _ONE_MINUS_DST_COLOR_ : blendingFactor readonly_prop + method _ONE_MINUS_DST_COLOR_ : blendingFactor readonly_prop - method _SRC_ALPHA_SATURATE_ : blendingFactor readonly_prop + method _SRC_ALPHA_SATURATE_ : blendingFactor readonly_prop - method _FUNC_ADD_ : blendMode readonly_prop + method _FUNC_ADD_ : blendMode readonly_prop - method _FUNC_SUBTRACT_ : blendMode readonly_prop + method _FUNC_SUBTRACT_ : blendMode readonly_prop - method _FUNC_REVERSE_SUBTRACT_ : blendMode readonly_prop + method _FUNC_REVERSE_SUBTRACT_ : blendMode readonly_prop - method _CONSTANT_COLOR_ : blendMode readonly_prop + method _CONSTANT_COLOR_ : blendMode readonly_prop - method _ONE_MINUS_CONSTANT_COLOR_ : blendMode readonly_prop + method _ONE_MINUS_CONSTANT_COLOR_ : blendMode readonly_prop - method _CONSTANT_ALPHA_ : blendMode readonly_prop + method _CONSTANT_ALPHA_ : blendMode readonly_prop - method _ONE_MINUS_CONSTANT_ALPHA_ : blendMode readonly_prop + method _ONE_MINUS_CONSTANT_ALPHA_ : blendMode readonly_prop - method _ARRAY_BUFFER_ : bufferTarget readonly_prop + method _ARRAY_BUFFER_ : bufferTarget readonly_prop - method _ELEMENT_ARRAY_BUFFER_ : bufferTarget readonly_prop + method _ELEMENT_ARRAY_BUFFER_ : bufferTarget readonly_prop - method _STREAM_DRAW_ : bufferUsage readonly_prop + method _STREAM_DRAW_ : bufferUsage readonly_prop - method _STATIC_DRAW_ : bufferUsage readonly_prop + method _STATIC_DRAW_ : bufferUsage readonly_prop - method _DYNAMIC_DRAW_ : bufferUsage readonly_prop + method _DYNAMIC_DRAW_ : bufferUsage readonly_prop - method _FRONT : cullFaceMode readonly_prop + method _FRONT : cullFaceMode readonly_prop - method _BACK : cullFaceMode readonly_prop + method _BACK : cullFaceMode readonly_prop - method _FRONT_AND_BACK_ : cullFaceMode readonly_prop + method _FRONT_AND_BACK_ : cullFaceMode readonly_prop - method _CULL_FACE_ : enableCap readonly_prop + method _CULL_FACE_ : enableCap readonly_prop - method _BLEND : enableCap readonly_prop + method _BLEND : enableCap readonly_prop - method _DITHER : enableCap readonly_prop + method _DITHER : enableCap readonly_prop - method _STENCIL_TEST_ : enableCap readonly_prop + method _STENCIL_TEST_ : enableCap readonly_prop - method _DEPTH_TEST_ : enableCap readonly_prop + method _DEPTH_TEST_ : enableCap readonly_prop - method _SCISSOR_TEST_ : enableCap readonly_prop + method _SCISSOR_TEST_ : enableCap readonly_prop - method _POLYGON_OFFSET_FILL_ : enableCap readonly_prop + method _POLYGON_OFFSET_FILL_ : enableCap readonly_prop - method _SAMPLE_ALPHA_TO_COVERAGE_ : enableCap readonly_prop + method _SAMPLE_ALPHA_TO_COVERAGE_ : enableCap readonly_prop - method _SAMPLE_COVERAGE_ : enableCap readonly_prop + method _SAMPLE_COVERAGE_ : enableCap readonly_prop - method _NO_ERROR_ : errorCode readonly_prop + method _NO_ERROR_ : errorCode readonly_prop - method _INVALID_ENUM_ : errorCode readonly_prop + method _INVALID_ENUM_ : errorCode readonly_prop - method _INVALID_VALUE_ : errorCode readonly_prop + method _INVALID_VALUE_ : errorCode readonly_prop - method _INVALID_OPERATION_ : errorCode readonly_prop + method _INVALID_OPERATION_ : errorCode readonly_prop - method _OUT_OF_MEMORY_ : errorCode readonly_prop + method _OUT_OF_MEMORY_ : errorCode readonly_prop - method _CONTEXT_LOST_WEBGL_ : errorCode readonly_prop + method _CONTEXT_LOST_WEBGL_ : errorCode readonly_prop - method _INVALID_FRAMEBUFFER_OPERATION_ : errorCode readonly_prop + method _INVALID_FRAMEBUFFER_OPERATION_ : errorCode readonly_prop - method _CW : frontFaceDir readonly_prop + method _CW : frontFaceDir readonly_prop - method _CCW : frontFaceDir readonly_prop + method _CCW : frontFaceDir readonly_prop - method _DONT_CARE_ : hintMode readonly_prop + method _DONT_CARE_ : hintMode readonly_prop - method _FASTEST : hintMode readonly_prop + method _FASTEST : hintMode readonly_prop - method _NICEST : hintMode readonly_prop + method _NICEST : hintMode readonly_prop - method _GENERATE_MIPMAP_HINT_ : hintTarget readonly_prop + method _GENERATE_MIPMAP_HINT_ : hintTarget readonly_prop - method _BLEND_EQUATION_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_ : blendMode parameter readonly_prop - method _BLEND_EQUATION_RGB_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_RGB_ : blendMode parameter readonly_prop - method _BLEND_EQUATION_ALPHA_ : blendMode parameter readonly_prop + method _BLEND_EQUATION_ALPHA_ : blendMode parameter readonly_prop - method _BLEND_DST_RGB_ : blendingFactor parameter readonly_prop + method _BLEND_DST_RGB_ : blendingFactor parameter readonly_prop - method _BLEND_SRC_RGB_ : blendingFactor parameter readonly_prop + method _BLEND_SRC_RGB_ : blendingFactor parameter readonly_prop - method _BLEND_DST_ALPHA_ : blendingFactor parameter readonly_prop + method _BLEND_DST_ALPHA_ : blendingFactor parameter readonly_prop - method _BLEND_SRC_ALPHA_ : blendingFactor parameter readonly_prop + method _BLEND_SRC_ALPHA_ : blendingFactor parameter readonly_prop - method _BLEND_COLOR_ : Typed_array.float32Array t parameter readonly_prop + method _BLEND_COLOR_ : Typed_array.float32Array t parameter readonly_prop - method _ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop + method _ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop - method _ELEMENT_ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop + method _ELEMENT_ARRAY_BUFFER_BINDING_ : buffer t opt parameter readonly_prop - method _CULL_FACE_PARAM : bool t parameter readonly_prop + method _CULL_FACE_PARAM : bool t parameter readonly_prop - method _BLEND_PARAM : bool t parameter readonly_prop + method _BLEND_PARAM : bool t parameter readonly_prop - method _DITHER_PARAM : bool t parameter readonly_prop + method _DITHER_PARAM : bool t parameter readonly_prop - method _STENCIL_TEST_PARAM : bool t parameter readonly_prop + method _STENCIL_TEST_PARAM : bool t parameter readonly_prop - method _DEPTH_TEST_PARAM : bool t parameter readonly_prop + method _DEPTH_TEST_PARAM : bool t parameter readonly_prop - method _SCISSOR_TEST_PARAM : bool t parameter readonly_prop + method _SCISSOR_TEST_PARAM : bool t parameter readonly_prop - method _POLYGON_OFFSET_FILL_PARAM : bool t parameter readonly_prop + method _POLYGON_OFFSET_FILL_PARAM : bool t parameter readonly_prop - method _LINE_WIDTH_ : float parameter readonly_prop + method _LINE_WIDTH_ : float parameter readonly_prop - method _ALIASED_POINT_SIZE_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _ALIASED_POINT_SIZE_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _ALIASED_LINE_WIDTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _ALIASED_LINE_WIDTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _CULL_FACE_MODE_ : cullFaceMode parameter readonly_prop + method _CULL_FACE_MODE_ : cullFaceMode parameter readonly_prop - method _FRONT_FACE_ : frontFaceDir parameter readonly_prop + method _FRONT_FACE_ : frontFaceDir parameter readonly_prop - method _DEPTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop + method _DEPTH_RANGE_ : Typed_array.float32Array t parameter readonly_prop - method _DEPTH_WRITEMASK_ : bool t parameter readonly_prop + method _DEPTH_WRITEMASK_ : bool t parameter readonly_prop - method _DEPTH_CLEAR_VALUE_ : float parameter readonly_prop + method _DEPTH_CLEAR_VALUE_ : float parameter readonly_prop - method _DEPTH_FUNC_ : depthFunction parameter readonly_prop + method _DEPTH_FUNC_ : depthFunction parameter readonly_prop - method _STENCIL_CLEAR_VALUE_ : int parameter readonly_prop + method _STENCIL_CLEAR_VALUE_ : int parameter readonly_prop - method _STENCIL_FUNC_ : int parameter readonly_prop + method _STENCIL_FUNC_ : int parameter readonly_prop - method _STENCIL_FAIL_ : int parameter readonly_prop + method _STENCIL_FAIL_ : int parameter readonly_prop - method _STENCIL_PASS_DEPTH_FAIL_ : int parameter readonly_prop + method _STENCIL_PASS_DEPTH_FAIL_ : int parameter readonly_prop - method _STENCIL_PASS_DEPTH_PASS_ : int parameter readonly_prop + method _STENCIL_PASS_DEPTH_PASS_ : int parameter readonly_prop - method _STENCIL_REF_ : int parameter readonly_prop + method _STENCIL_REF_ : int parameter readonly_prop - method _STENCIL_VALUE_MASK_ : int parameter readonly_prop + method _STENCIL_VALUE_MASK_ : int parameter readonly_prop - method _STENCIL_WRITEMASK_ : int parameter readonly_prop + method _STENCIL_WRITEMASK_ : int parameter readonly_prop - method _STENCIL_BACK_FUNC_ : int parameter readonly_prop + method _STENCIL_BACK_FUNC_ : int parameter readonly_prop - method _STENCIL_BACK_FAIL_ : int parameter readonly_prop + method _STENCIL_BACK_FAIL_ : int parameter readonly_prop - method _STENCIL_BACK_PASS_DEPTH_FAIL_ : int parameter readonly_prop + method _STENCIL_BACK_PASS_DEPTH_FAIL_ : int parameter readonly_prop - method _STENCIL_BACK_PASS_DEPTH_PASS_ : int parameter readonly_prop + method _STENCIL_BACK_PASS_DEPTH_PASS_ : int parameter readonly_prop - method _STENCIL_BACK_REF_ : int parameter readonly_prop + method _STENCIL_BACK_REF_ : int parameter readonly_prop - method _STENCIL_BACK_VALUE_MASK_ : int parameter readonly_prop + method _STENCIL_BACK_VALUE_MASK_ : int parameter readonly_prop - method _STENCIL_BACK_WRITEMASK_ : int parameter readonly_prop + method _STENCIL_BACK_WRITEMASK_ : int parameter readonly_prop - method _VIEWPORT : Typed_array.int32Array t parameter readonly_prop + method _VIEWPORT : Typed_array.int32Array t parameter readonly_prop - method _SCISSOR_BOX_ : Typed_array.int32Array t parameter readonly_prop + method _SCISSOR_BOX_ : Typed_array.int32Array t parameter readonly_prop - method _COLOR_CLEAR_VALUE_ : Typed_array.float32Array t parameter readonly_prop + method _COLOR_CLEAR_VALUE_ : Typed_array.float32Array t parameter readonly_prop - method _COLOR_WRITEMASK_ : bool t js_array t parameter readonly_prop + method _COLOR_WRITEMASK_ : bool t js_array t parameter readonly_prop - method _UNPACK_ALIGNMENT_PARAM : int parameter readonly_prop + method _UNPACK_ALIGNMENT_PARAM : int parameter readonly_prop - method _PACK_ALIGNMENT_ : int parameter readonly_prop + method _PACK_ALIGNMENT_ : int parameter readonly_prop - method _MAX_TEXTURE_SIZE_ : int parameter readonly_prop + method _MAX_TEXTURE_SIZE_ : int parameter readonly_prop - method _MAX_VIEWPORT_DIMS_ : Typed_array.int32Array t parameter readonly_prop + method _MAX_VIEWPORT_DIMS_ : Typed_array.int32Array t parameter readonly_prop - method _SUBPIXEL_BITS_ : int parameter readonly_prop + method _SUBPIXEL_BITS_ : int parameter readonly_prop - method _RED_BITS_ : int parameter readonly_prop + method _RED_BITS_ : int parameter readonly_prop - method _GREEN_BITS_ : int parameter readonly_prop + method _GREEN_BITS_ : int parameter readonly_prop - method _BLUE_BITS_ : int parameter readonly_prop + method _BLUE_BITS_ : int parameter readonly_prop - method _ALPHA_BITS_ : int parameter readonly_prop + method _ALPHA_BITS_ : int parameter readonly_prop - method _DEPTH_BITS_ : int parameter readonly_prop + method _DEPTH_BITS_ : int parameter readonly_prop - method _STENCIL_BITS_ : int parameter readonly_prop + method _STENCIL_BITS_ : int parameter readonly_prop - method _POLYGON_OFFSET_UNITS_ : float parameter readonly_prop + method _POLYGON_OFFSET_UNITS_ : float parameter readonly_prop - method _POLYGON_OFFSET_FACTOR_ : float parameter readonly_prop + method _POLYGON_OFFSET_FACTOR_ : float parameter readonly_prop - method _TEXTURE_BINDING_2D_ : texture t opt parameter readonly_prop + method _TEXTURE_BINDING_2D_ : texture t opt parameter readonly_prop - method _TEXTURE_BINDING_CUBE_MAP_ : texture t opt parameter readonly_prop + method _TEXTURE_BINDING_CUBE_MAP_ : texture t opt parameter readonly_prop - method _SAMPLE_BUFFERS_ : int parameter readonly_prop + method _SAMPLE_BUFFERS_ : int parameter readonly_prop - method _SAMPLES_ : int parameter readonly_prop + method _SAMPLES_ : int parameter readonly_prop - method _SAMPLE_COVERAGE_VALUE_ : float parameter readonly_prop + method _SAMPLE_COVERAGE_VALUE_ : float parameter readonly_prop - method _SAMPLE_COVERAGE_INVERT_ : bool t parameter readonly_prop + method _SAMPLE_COVERAGE_INVERT_ : bool t parameter readonly_prop - method _NUM_COMPRESSED_TEXTURE_FORMATS_ : int parameter readonly_prop + method _NUM_COMPRESSED_TEXTURE_FORMATS_ : int parameter readonly_prop - method _COMPRESSED_TEXTURE_FORMATS_ : - Typed_array.uint32Array t parameter readonly_prop + method _COMPRESSED_TEXTURE_FORMATS_ : Typed_array.uint32Array t parameter readonly_prop - method _GENERATE_MIPMAP_HINT_PARAM_ : hintMode parameter readonly_prop + method _GENERATE_MIPMAP_HINT_PARAM_ : hintMode parameter readonly_prop - method _BUFFER_SIZE_ : int bufferParameter readonly_prop + method _BUFFER_SIZE_ : int bufferParameter readonly_prop - method _BUFFER_USAGE_ : bufferUsage bufferParameter readonly_prop + method _BUFFER_USAGE_ : bufferUsage bufferParameter readonly_prop - method _BYTE : dataType readonly_prop + method _BYTE : dataType readonly_prop - method _UNSIGNED_BYTE_DT : dataType readonly_prop + method _UNSIGNED_BYTE_DT : dataType readonly_prop - method _SHORT : dataType readonly_prop + method _SHORT : dataType readonly_prop - method _UNSIGNED_SHORT_ : dataType readonly_prop + method _UNSIGNED_SHORT_ : dataType readonly_prop - method _INT : dataType readonly_prop + method _INT : dataType readonly_prop - method _UNSIGNED_INT_ : dataType readonly_prop + method _UNSIGNED_INT_ : dataType readonly_prop - method _FLOAT : dataType readonly_prop + method _FLOAT : dataType readonly_prop - method _UNSIGNED_BYTE_ : pixelType readonly_prop + method _UNSIGNED_BYTE_ : pixelType readonly_prop - method _UNSIGNED_SHORT_4_4_4_4_ : pixelType readonly_prop + method _UNSIGNED_SHORT_4_4_4_4_ : pixelType readonly_prop - method _UNSIGNED_SHORT_5_5_5_1_ : pixelType readonly_prop + method _UNSIGNED_SHORT_5_5_5_1_ : pixelType readonly_prop - method _UNSIGNED_SHORT_5_6_5_ : pixelType readonly_prop + method _UNSIGNED_SHORT_5_6_5_ : pixelType readonly_prop - method _ALPHA : pixelFormat readonly_prop + method _ALPHA : pixelFormat readonly_prop - method _RGB : pixelFormat readonly_prop + method _RGB : pixelFormat readonly_prop - method _RGBA : pixelFormat readonly_prop + method _RGBA : pixelFormat readonly_prop - method _LUMINANCE : pixelFormat readonly_prop + method _LUMINANCE : pixelFormat readonly_prop - method _LUMINANCE_ALPHA_ : pixelFormat readonly_prop + method _LUMINANCE_ALPHA_ : pixelFormat readonly_prop - method _STENCIL_INDEX_ : pixelFormat readonly_prop + method _STENCIL_INDEX_ : pixelFormat readonly_prop - method _DEPTH_STENCIL_ : pixelFormat readonly_prop + method _DEPTH_STENCIL_ : pixelFormat readonly_prop - method _DEPTH_COMPONENT_ : pixelFormat readonly_prop + method _DEPTH_COMPONENT_ : pixelFormat readonly_prop - method _FRAGMENT_SHADER_ : shaderType readonly_prop + method _FRAGMENT_SHADER_ : shaderType readonly_prop - method _VERTEX_SHADER_ : shaderType readonly_prop + method _VERTEX_SHADER_ : shaderType readonly_prop - method _MAX_VERTEX_ATTRIBS_ : int parameter readonly_prop + method _MAX_VERTEX_ATTRIBS_ : int parameter readonly_prop - method _MAX_VERTEX_UNIFORM_VECTORS_ : int parameter readonly_prop + method _MAX_VERTEX_UNIFORM_VECTORS_ : int parameter readonly_prop - method _MAX_VARYING_VECTORS_ : int parameter readonly_prop + method _MAX_VARYING_VECTORS_ : int parameter readonly_prop - method _MAX_COMBINED_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_COMBINED_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_VERTEX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_VERTEX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop + method _MAX_TEXTURE_IMAGE_UNITS_ : int parameter readonly_prop - method _MAX_FRAGMENT_UNIFORM_VECTORS_ : int parameter readonly_prop + method _MAX_FRAGMENT_UNIFORM_VECTORS_ : int parameter readonly_prop - method _SHADER_TYPE_ : shaderType shaderParam readonly_prop + method _SHADER_TYPE_ : shaderType shaderParam readonly_prop - method _DELETE_STATUS_ : bool t shaderParam readonly_prop + method _DELETE_STATUS_ : bool t shaderParam readonly_prop - method _COMPILE_STATUS_ : bool t shaderParam readonly_prop + method _COMPILE_STATUS_ : bool t shaderParam readonly_prop - method _DELETE_STATUS_PROG : bool t programParam readonly_prop + method _DELETE_STATUS_PROG : bool t programParam readonly_prop - method _LINK_STATUS_ : bool t programParam readonly_prop + method _LINK_STATUS_ : bool t programParam readonly_prop - method _VALIDATE_STATUS_ : bool t programParam readonly_prop + method _VALIDATE_STATUS_ : bool t programParam readonly_prop - method _ATTACHED_SHADERS_ : int programParam readonly_prop + method _ATTACHED_SHADERS_ : int programParam readonly_prop - method _ACTIVE_UNIFORMS_ : int programParam readonly_prop + method _ACTIVE_UNIFORMS_ : int programParam readonly_prop - method _ACTIVE_ATTRIBUTES_ : int programParam readonly_prop + method _ACTIVE_ATTRIBUTES_ : int programParam readonly_prop - method _SHADING_LANGUAGE_VERSION_ : js_string t parameter readonly_prop + method _SHADING_LANGUAGE_VERSION_ : js_string t parameter readonly_prop - method _CURRENT_PROGRAM_ : program t opt parameter readonly_prop + method _CURRENT_PROGRAM_ : program t opt parameter readonly_prop - method _VENDOR : js_string t parameter readonly_prop + method _VENDOR : js_string t parameter readonly_prop - method _RENDERER : js_string t parameter readonly_prop + method _RENDERER : js_string t parameter readonly_prop - method _VERSION : js_string t parameter readonly_prop + method _VERSION : js_string t parameter readonly_prop - method _MAX_CUBE_MAP_TEXTURE_SIZE_ : int parameter readonly_prop + method _MAX_CUBE_MAP_TEXTURE_SIZE_ : int parameter readonly_prop - method _ACTIVE_TEXTURE_ : textureUnit parameter readonly_prop + method _ACTIVE_TEXTURE_ : textureUnit parameter readonly_prop - method _FRAMEBUFFER_BINDING_ : framebuffer t opt parameter readonly_prop + method _FRAMEBUFFER_BINDING_ : framebuffer t opt parameter readonly_prop - method _RENDERBUFFER_BINDING_ : renderbuffer t opt parameter readonly_prop + method _RENDERBUFFER_BINDING_ : renderbuffer t opt parameter readonly_prop - method _MAX_RENDERBUFFER_SIZE : int parameter readonly_prop + method _MAX_RENDERBUFFER_SIZE : int parameter readonly_prop - method _NEVER : depthFunction readonly_prop + method _NEVER : depthFunction readonly_prop - method _LESS : depthFunction readonly_prop + method _LESS : depthFunction readonly_prop - method _EQUAL : depthFunction readonly_prop + method _EQUAL : depthFunction readonly_prop - method _LEQUAL : depthFunction readonly_prop + method _LEQUAL : depthFunction readonly_prop - method _GREATER : depthFunction readonly_prop + method _GREATER : depthFunction readonly_prop - method _NOTEQUAL : depthFunction readonly_prop + method _NOTEQUAL : depthFunction readonly_prop - method _GEQUAL : depthFunction readonly_prop + method _GEQUAL : depthFunction readonly_prop - method _ALWAYS : depthFunction readonly_prop + method _ALWAYS : depthFunction readonly_prop - method _KEEP : stencilOp readonly_prop + method _KEEP : stencilOp readonly_prop - method _REPLACE : stencilOp readonly_prop + method _REPLACE : stencilOp readonly_prop - method _INCR : stencilOp readonly_prop + method _INCR : stencilOp readonly_prop - method _DECR : stencilOp readonly_prop + method _DECR : stencilOp readonly_prop - method _INVERT : stencilOp readonly_prop + method _INVERT : stencilOp readonly_prop - method _INCR_WRAP_ : stencilOp readonly_prop + method _INCR_WRAP_ : stencilOp readonly_prop - method _DECR_WRAP_ : stencilOp readonly_prop + method _DECR_WRAP_ : stencilOp readonly_prop - method _ZERO_ : stencilOp readonly_prop + method _ZERO_ : stencilOp readonly_prop - method _NEAREST : texFilter readonly_prop + method _NEAREST : texFilter readonly_prop - method _LINEAR : texFilter readonly_prop + method _LINEAR : texFilter readonly_prop - method _NEAREST_MIPMAP_NEAREST_ : texFilter readonly_prop + method _NEAREST_MIPMAP_NEAREST_ : texFilter readonly_prop - method _LINEAR_MIPMAP_NEAREST_ : texFilter readonly_prop + method _LINEAR_MIPMAP_NEAREST_ : texFilter readonly_prop - method _NEAREST_MIPMAP_LINEAR_ : texFilter readonly_prop + method _NEAREST_MIPMAP_LINEAR_ : texFilter readonly_prop - method _LINEAR_MIPMAP_LINEAR_ : texFilter readonly_prop + method _LINEAR_MIPMAP_LINEAR_ : texFilter readonly_prop - method _TEXTURE_MAG_FILTER_ : texFilter texParam readonly_prop + method _TEXTURE_MAG_FILTER_ : texFilter texParam readonly_prop - method _TEXTURE_MIN_FILTER_ : texFilter texParam readonly_prop + method _TEXTURE_MIN_FILTER_ : texFilter texParam readonly_prop - method _TEXTURE_WRAP_S_ : wrapMode texParam readonly_prop + method _TEXTURE_WRAP_S_ : wrapMode texParam readonly_prop - method _TEXTURE_WRAP_T_ : wrapMode texParam readonly_prop + method _TEXTURE_WRAP_T_ : wrapMode texParam readonly_prop - method _NONE_OT : objectType readonly_prop + method _NONE_OT : objectType readonly_prop - method _TEXTURE_OT : objectType readonly_prop + method _TEXTURE_OT : objectType readonly_prop - method _RENDERBUFFER_OT : objectType readonly_prop + method _RENDERBUFFER_OT : objectType readonly_prop - method _TEXTURE_2D_ : texTarget readonly_prop + method _TEXTURE_2D_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_X_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_X_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_X_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_X_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_Y_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_Y_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_Y_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_Y_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_POSITIVE_Z_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_POSITIVE_Z_ : texTarget readonly_prop - method _TEXTURE_CUBE_MAP_NEGATIVE_Z_ : texTarget readonly_prop + method _TEXTURE_CUBE_MAP_NEGATIVE_Z_ : texTarget readonly_prop - method _TEXTURE0 : textureUnit readonly_prop + method _TEXTURE0 : textureUnit readonly_prop - method _TEXTURE1 : textureUnit readonly_prop + method _TEXTURE1 : textureUnit readonly_prop - method _TEXTURE2 : textureUnit readonly_prop + method _TEXTURE2 : textureUnit readonly_prop - method _TEXTURE3 : textureUnit readonly_prop + method _TEXTURE3 : textureUnit readonly_prop - method _TEXTURE4 : textureUnit readonly_prop + method _TEXTURE4 : textureUnit readonly_prop - method _TEXTURE5 : textureUnit readonly_prop + method _TEXTURE5 : textureUnit readonly_prop - method _TEXTURE6 : textureUnit readonly_prop + method _TEXTURE6 : textureUnit readonly_prop - method _TEXTURE7 : textureUnit readonly_prop + method _TEXTURE7 : textureUnit readonly_prop - method _TEXTURE8 : textureUnit readonly_prop + method _TEXTURE8 : textureUnit readonly_prop - method _TEXTURE9 : textureUnit readonly_prop + method _TEXTURE9 : textureUnit readonly_prop - method _TEXTURE10 : textureUnit readonly_prop + method _TEXTURE10 : textureUnit readonly_prop - method _TEXTURE11 : textureUnit readonly_prop + method _TEXTURE11 : textureUnit readonly_prop - method _TEXTURE12 : textureUnit readonly_prop + method _TEXTURE12 : textureUnit readonly_prop - method _TEXTURE13 : textureUnit readonly_prop + method _TEXTURE13 : textureUnit readonly_prop - method _TEXTURE14 : textureUnit readonly_prop + method _TEXTURE14 : textureUnit readonly_prop - method _TEXTURE15 : textureUnit readonly_prop + method _TEXTURE15 : textureUnit readonly_prop - method _TEXTURE16 : textureUnit readonly_prop + method _TEXTURE16 : textureUnit readonly_prop - method _TEXTURE17 : textureUnit readonly_prop + method _TEXTURE17 : textureUnit readonly_prop - method _TEXTURE18 : textureUnit readonly_prop + method _TEXTURE18 : textureUnit readonly_prop - method _TEXTURE19 : textureUnit readonly_prop + method _TEXTURE19 : textureUnit readonly_prop - method _TEXTURE20 : textureUnit readonly_prop + method _TEXTURE20 : textureUnit readonly_prop - method _TEXTURE21 : textureUnit readonly_prop + method _TEXTURE21 : textureUnit readonly_prop - method _TEXTURE22 : textureUnit readonly_prop + method _TEXTURE22 : textureUnit readonly_prop - method _TEXTURE23 : textureUnit readonly_prop + method _TEXTURE23 : textureUnit readonly_prop - method _TEXTURE24 : textureUnit readonly_prop + method _TEXTURE24 : textureUnit readonly_prop - method _TEXTURE25 : textureUnit readonly_prop + method _TEXTURE25 : textureUnit readonly_prop - method _TEXTURE26 : textureUnit readonly_prop + method _TEXTURE26 : textureUnit readonly_prop - method _TEXTURE27 : textureUnit readonly_prop + method _TEXTURE27 : textureUnit readonly_prop - method _TEXTURE28 : textureUnit readonly_prop + method _TEXTURE28 : textureUnit readonly_prop - method _TEXTURE29 : textureUnit readonly_prop + method _TEXTURE29 : textureUnit readonly_prop - method _TEXTURE30 : textureUnit readonly_prop + method _TEXTURE30 : textureUnit readonly_prop - method _TEXTURE31 : textureUnit readonly_prop + method _TEXTURE31 : textureUnit readonly_prop - method _REPEAT : wrapMode readonly_prop + method _REPEAT : wrapMode readonly_prop - method _CLAMP_TO_EDGE_ : wrapMode readonly_prop + method _CLAMP_TO_EDGE_ : wrapMode readonly_prop - method _MIRRORED_REPEAT_ : wrapMode readonly_prop + method _MIRRORED_REPEAT_ : wrapMode readonly_prop - method _FLOAT_ : uniformType readonly_prop + method _FLOAT_ : uniformType readonly_prop - method _FLOAT_VEC2_ : uniformType readonly_prop + method _FLOAT_VEC2_ : uniformType readonly_prop - method _FLOAT_VEC3_ : uniformType readonly_prop + method _FLOAT_VEC3_ : uniformType readonly_prop - method _FLOAT_VEC4_ : uniformType readonly_prop + method _FLOAT_VEC4_ : uniformType readonly_prop - method _INT_ : uniformType readonly_prop + method _INT_ : uniformType readonly_prop - method _INT_VEC2_ : uniformType readonly_prop + method _INT_VEC2_ : uniformType readonly_prop - method _INT_VEC3_ : uniformType readonly_prop + method _INT_VEC3_ : uniformType readonly_prop - method _INT_VEC4_ : uniformType readonly_prop + method _INT_VEC4_ : uniformType readonly_prop - method _BOOL_ : uniformType readonly_prop + method _BOOL_ : uniformType readonly_prop - method _BOOL_VEC2_ : uniformType readonly_prop + method _BOOL_VEC2_ : uniformType readonly_prop - method _BOOL_VEC3_ : uniformType readonly_prop + method _BOOL_VEC3_ : uniformType readonly_prop - method _BOOL_VEC4_ : uniformType readonly_prop + method _BOOL_VEC4_ : uniformType readonly_prop - method _FLOAT_MAT2_ : uniformType readonly_prop + method _FLOAT_MAT2_ : uniformType readonly_prop - method _FLOAT_MAT3_ : uniformType readonly_prop + method _FLOAT_MAT3_ : uniformType readonly_prop - method _FLOAT_MAT4_ : uniformType readonly_prop + method _FLOAT_MAT4_ : uniformType readonly_prop - method _SAMPLER_2D_ : uniformType readonly_prop + method _SAMPLER_2D_ : uniformType readonly_prop - method _SAMPLER_CUBE_ : uniformType readonly_prop + method _SAMPLER_CUBE_ : uniformType readonly_prop - method _VERTEX_ATTRIB_ARRAY_ENABLED_ : bool t vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_ENABLED_ : bool t vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_SIZE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_SIZE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_STRIDE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_STRIDE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_TYPE_ : int vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_TYPE_ : int vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_NORMALIZED_ : bool t vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_NORMALIZED_ : bool t vertexAttribParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_POINTER_ : vertexAttribPointerParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_POINTER_ : vertexAttribPointerParam readonly_prop - method _VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ : - buffer t opt vertexAttribParam readonly_prop + method _VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ : + buffer t opt vertexAttribParam readonly_prop - method _CURRENT_VERTEX_ATTRIB_ : - Typed_array.float32Array t vertexAttribParam readonly_prop + method _CURRENT_VERTEX_ATTRIB_ : + Typed_array.float32Array t vertexAttribParam readonly_prop - method _LOW_FLOAT_ : shaderPrecisionType readonly_prop + method _LOW_FLOAT_ : shaderPrecisionType readonly_prop - method _MEDIUM_FLOAT_ : shaderPrecisionType readonly_prop + method _MEDIUM_FLOAT_ : shaderPrecisionType readonly_prop - method _HIGH_FLOAT_ : shaderPrecisionType readonly_prop + method _HIGH_FLOAT_ : shaderPrecisionType readonly_prop - method _LOW_INT_ : shaderPrecisionType readonly_prop + method _LOW_INT_ : shaderPrecisionType readonly_prop - method _MEDIUM_INT_ : shaderPrecisionType readonly_prop + method _MEDIUM_INT_ : shaderPrecisionType readonly_prop - method _HIGH_INT_ : shaderPrecisionType readonly_prop + method _HIGH_INT_ : shaderPrecisionType readonly_prop - method _FRAMEBUFFER : fbTarget readonly_prop + method _FRAMEBUFFER : fbTarget readonly_prop - method _RENDERBUFFER : rbTarget readonly_prop + method _RENDERBUFFER : rbTarget readonly_prop - method _RGBA4 : format readonly_prop + method _RGBA4 : format readonly_prop - method _RGB5_A1_ : format readonly_prop + method _RGB5_A1_ : format readonly_prop - method _RGB565 : format readonly_prop + method _RGB565 : format readonly_prop - method _DEPTH_COMPONENT16_ : format readonly_prop + method _DEPTH_COMPONENT16_ : format readonly_prop - method _STENCIL_INDEX8_ : format readonly_prop + method _STENCIL_INDEX8_ : format readonly_prop - method _RENDERBUFFER_WIDTH_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_WIDTH_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_HEIGHT_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_HEIGHT_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_INTERNAL_FORMAT_ : format renderbufferParam readonly_prop + method _RENDERBUFFER_INTERNAL_FORMAT_ : format renderbufferParam readonly_prop - method _RENDERBUFFER_RED_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_RED_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_GREEN_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_GREEN_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_BLUE_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_BLUE_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_ALPHA_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_ALPHA_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_DEPTH_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_DEPTH_SIZE_ : int renderbufferParam readonly_prop - method _RENDERBUFFER_STENCIL_SIZE_ : int renderbufferParam readonly_prop + method _RENDERBUFFER_STENCIL_SIZE_ : int renderbufferParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_ : objectType attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_ : objectType attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_RENDERBUFFER : - renderbuffer t attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_RENDERBUFFER : + renderbuffer t attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_TEXTURE : - texture t attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_TEXTURE : + texture t attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_ : int attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_ : int attachParam readonly_prop - method _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_ : int attachParam readonly_prop + method _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_ : int attachParam readonly_prop - method _COLOR_ATTACHMENT0_ : attachmentPoint readonly_prop + method _COLOR_ATTACHMENT0_ : attachmentPoint readonly_prop - method _DEPTH_ATTACHMENT_ : attachmentPoint readonly_prop + method _DEPTH_ATTACHMENT_ : attachmentPoint readonly_prop - method _STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop + method _STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop - method _DEPTH_STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop + method _DEPTH_STENCIL_ATTACHMENT_ : attachmentPoint readonly_prop - method _FRAMEBUFFER_COMPLETE_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_COMPLETE_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_ATTACHMENT_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_ATTACHMENT_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_INCOMPLETE_DIMENSIONS_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_INCOMPLETE_DIMENSIONS_ : framebufferStatus readonly_prop - method _FRAMEBUFFER_UNSUPPORTED_ : framebufferStatus readonly_prop + method _FRAMEBUFFER_UNSUPPORTED_ : framebufferStatus readonly_prop - method _UNPACK_FLIP_Y_WEBGL_PARAM : bool t parameter readonly_prop + method _UNPACK_FLIP_Y_WEBGL_PARAM : bool t parameter readonly_prop - method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_PARAM : bool t parameter readonly_prop + method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_PARAM : bool t parameter readonly_prop - method _UNPACK_COLORSPACE_CONVERSION_WEBGL_PARAM : - colorspaceConversion parameter readonly_prop + method _UNPACK_COLORSPACE_CONVERSION_WEBGL_PARAM : + colorspaceConversion parameter readonly_prop - method _NONE : colorspaceConversion readonly_prop + method _NONE : colorspaceConversion readonly_prop - method _BROWSER_DEFAULT_WEBGL_ : colorspaceConversion readonly_prop + method _BROWSER_DEFAULT_WEBGL_ : colorspaceConversion readonly_prop - method _UNPACK_ALIGNMENT_ : int pixelStoreParam readonly_prop + method _UNPACK_ALIGNMENT_ : int pixelStoreParam readonly_prop - method _UNPACK_FLIP_Y_WEBGL_ : bool t pixelStoreParam readonly_prop + method _UNPACK_FLIP_Y_WEBGL_ : bool t pixelStoreParam readonly_prop - method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_ : bool t pixelStoreParam readonly_prop + method _UNPACK_PREMULTIPLY_ALPHA_WEBGL_ : bool t pixelStoreParam readonly_prop - method _UNPACK_COLORSPACE_CONVERSION_WEBGL_ : int pixelStoreParam readonly_prop - end + method _UNPACK_COLORSPACE_CONVERSION_WEBGL_ : int pixelStoreParam readonly_prop +end (** 5.14 WebGLContextEvent *) -class type contextEvent = - object - inherit Dom_html.event +class type contextEvent = object + inherit Dom_html.event - method statusMessage : js_string t readonly_prop - end + method statusMessage : js_string t readonly_prop +end module Event : sig val webglcontextlost : contextEvent t Dom_html.Event.typ diff --git a/lib/js_of_ocaml/webSockets.ml b/lib/js_of_ocaml/webSockets.ml index c878df9cce..390e3edb86 100644 --- a/lib/js_of_ocaml/webSockets.ml +++ b/lib/js_of_ocaml/webSockets.ml @@ -26,68 +26,63 @@ type readyState = | CLOSING | CLOSED -class type ['a] closeEvent = - object - inherit ['a] Dom.event +class type ['a] closeEvent = object + inherit ['a] Dom.event - method code : int Js.readonly_prop + method code : int Js.readonly_prop - method reason : Js.js_string Js.t Js.readonly_prop + method reason : Js.js_string Js.t Js.readonly_prop - method wasClean : bool Js.t Js.readonly_prop - end + method wasClean : bool Js.t Js.readonly_prop +end -class type ['a] messageEvent = - object - inherit ['a] Dom.event +class type ['a] messageEvent = object + inherit ['a] Dom.event - method data : Js.js_string Js.t Js.readonly_prop + method data : Js.js_string Js.t Js.readonly_prop - method data_buffer : Typed_array.arrayBuffer Js.t Js.readonly_prop + method data_buffer : Typed_array.arrayBuffer Js.t Js.readonly_prop - method data_blob : File.blob Js.t Js.readonly_prop - end + method data_blob : File.blob Js.t Js.readonly_prop +end -class type webSocket = - object ('self) - inherit Dom_html.eventTarget +class type webSocket = object ('self) + inherit Dom_html.eventTarget - method url : Js.js_string Js.t Js.readonly_prop + method url : Js.js_string Js.t Js.readonly_prop - method readyState : readyState Js.readonly_prop + method readyState : readyState Js.readonly_prop - method bufferedAmount : int Js.readonly_prop + method bufferedAmount : int Js.readonly_prop - method onopen : - ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop + method onopen : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop - method onclose : - ('self Js.t, 'self closeEvent Js.t) Dom.event_listener Js.writeonly_prop + method onclose : + ('self Js.t, 'self closeEvent Js.t) Dom.event_listener Js.writeonly_prop - method onerror : - ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop + method onerror : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop - method extensions : Js.js_string Js.t Js.readonly_prop + method extensions : Js.js_string Js.t Js.readonly_prop - method protocol : Js.js_string Js.t Js.readonly_prop + method protocol : Js.js_string Js.t Js.readonly_prop - method close : unit Js.meth + method close : unit Js.meth - method close_withCode : int -> unit Js.meth + method close_withCode : int -> unit Js.meth - method close_withCodeAndReason : int -> Js.js_string Js.t -> unit Js.meth + method close_withCodeAndReason : int -> Js.js_string Js.t -> unit Js.meth - method onmessage : - ('self Js.t, 'self messageEvent Js.t) Dom.event_listener Js.writeonly_prop + method onmessage : + ('self Js.t, 'self messageEvent Js.t) Dom.event_listener Js.writeonly_prop - method binaryType : Js.js_string Js.t Js.prop + method binaryType : Js.js_string Js.t Js.prop - method send : Js.js_string Js.t -> unit Js.meth + method send : Js.js_string Js.t -> unit Js.meth - method send_buffer : Typed_array.arrayBuffer Js.t -> unit Js.meth + method send_buffer : Typed_array.arrayBuffer Js.t -> unit Js.meth - method send_blob : File.blob Js.t -> unit Js.meth - end + method send_blob : File.blob Js.t -> unit Js.meth +end let webSocket = Js.Unsafe.global##._WebSocket diff --git a/lib/js_of_ocaml/webSockets.mli b/lib/js_of_ocaml/webSockets.mli index 35e850e802..89157ddfac 100644 --- a/lib/js_of_ocaml/webSockets.mli +++ b/lib/js_of_ocaml/webSockets.mli @@ -26,68 +26,63 @@ type readyState = | CLOSING | CLOSED -class type ['a] closeEvent = - object - inherit ['a] Dom.event +class type ['a] closeEvent = object + inherit ['a] Dom.event - method code : int Js.readonly_prop + method code : int Js.readonly_prop - method reason : Js.js_string Js.t Js.readonly_prop + method reason : Js.js_string Js.t Js.readonly_prop - method wasClean : bool Js.t Js.readonly_prop - end + method wasClean : bool Js.t Js.readonly_prop +end -class type ['a] messageEvent = - object - inherit ['a] Dom.event +class type ['a] messageEvent = object + inherit ['a] Dom.event - method data : Js.js_string Js.t Js.readonly_prop + method data : Js.js_string Js.t Js.readonly_prop - method data_buffer : Typed_array.arrayBuffer Js.t Js.readonly_prop + method data_buffer : Typed_array.arrayBuffer Js.t Js.readonly_prop - method data_blob : File.blob Js.t Js.readonly_prop - end + method data_blob : File.blob Js.t Js.readonly_prop +end -class type webSocket = - object ('self) - inherit Dom_html.eventTarget +class type webSocket = object ('self) + inherit Dom_html.eventTarget - method url : Js.js_string Js.t Js.readonly_prop + method url : Js.js_string Js.t Js.readonly_prop - method readyState : readyState Js.readonly_prop + method readyState : readyState Js.readonly_prop - method bufferedAmount : int Js.readonly_prop + method bufferedAmount : int Js.readonly_prop - method onopen : - ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop + method onopen : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop - method onclose : - ('self Js.t, 'self closeEvent Js.t) Dom.event_listener Js.writeonly_prop + method onclose : + ('self Js.t, 'self closeEvent Js.t) Dom.event_listener Js.writeonly_prop - method onerror : - ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop + method onerror : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop - method extensions : Js.js_string Js.t Js.readonly_prop + method extensions : Js.js_string Js.t Js.readonly_prop - method protocol : Js.js_string Js.t Js.readonly_prop + method protocol : Js.js_string Js.t Js.readonly_prop - method close : unit Js.meth + method close : unit Js.meth - method close_withCode : int -> unit Js.meth + method close_withCode : int -> unit Js.meth - method close_withCodeAndReason : int -> Js.js_string Js.t -> unit Js.meth + method close_withCodeAndReason : int -> Js.js_string Js.t -> unit Js.meth - method onmessage : - ('self Js.t, 'self messageEvent Js.t) Dom.event_listener Js.writeonly_prop + method onmessage : + ('self Js.t, 'self messageEvent Js.t) Dom.event_listener Js.writeonly_prop - method binaryType : Js.js_string Js.t Js.prop + method binaryType : Js.js_string Js.t Js.prop - method send : Js.js_string Js.t -> unit Js.meth + method send : Js.js_string Js.t -> unit Js.meth - method send_buffer : Typed_array.arrayBuffer Js.t -> unit Js.meth + method send_buffer : Typed_array.arrayBuffer Js.t -> unit Js.meth - method send_blob : File.blob Js.t -> unit Js.meth - end + method send_blob : File.blob Js.t -> unit Js.meth +end val webSocket : (Js.js_string Js.t -> webSocket Js.t) Js.constr diff --git a/lib/js_of_ocaml/worker.ml b/lib/js_of_ocaml/worker.ml index 732ae43725..d654a9df5f 100644 --- a/lib/js_of_ocaml/worker.ml +++ b/lib/js_of_ocaml/worker.ml @@ -21,40 +21,37 @@ open Js open Dom_html open! Import -class type ['a, 'b] worker = - object ('self) - inherit eventTarget +class type ['a, 'b] worker = object ('self) + inherit eventTarget - method onerror : ('self t, errorEvent t) event_listener writeonly_prop + method onerror : ('self t, errorEvent t) event_listener writeonly_prop - method onmessage : ('self t, 'b messageEvent t) event_listener writeonly_prop + method onmessage : ('self t, 'b messageEvent t) event_listener writeonly_prop - method postMessage : 'a -> unit meth + method postMessage : 'a -> unit meth - method terminate : unit meth - end + method terminate : unit meth +end -and errorEvent = - object - inherit event +and errorEvent = object + inherit event - method message : js_string t readonly_prop + method message : js_string t readonly_prop - method filename : js_string t readonly_prop + method filename : js_string t readonly_prop - method lineno : int readonly_prop + method lineno : int readonly_prop - method colno : int readonly_prop + method colno : int readonly_prop - method error : Unsafe.any readonly_prop - end + method error : Unsafe.any readonly_prop +end -and ['a] messageEvent = - object - inherit event +and ['a] messageEvent = object + inherit event - method data : 'a readonly_prop - end + method data : 'a readonly_prop +end let worker = Unsafe.global##._Worker diff --git a/lib/js_of_ocaml/worker.mli b/lib/js_of_ocaml/worker.mli index 4634e22762..783b778adf 100644 --- a/lib/js_of_ocaml/worker.mli +++ b/lib/js_of_ocaml/worker.mli @@ -29,40 +29,37 @@ open Js open Dom_html -class type ['a, 'b] worker = - object ('self) - inherit eventTarget +class type ['a, 'b] worker = object ('self) + inherit eventTarget - method onerror : ('self t, errorEvent t) event_listener writeonly_prop + method onerror : ('self t, errorEvent t) event_listener writeonly_prop - method onmessage : ('self t, 'b messageEvent t) event_listener writeonly_prop + method onmessage : ('self t, 'b messageEvent t) event_listener writeonly_prop - method postMessage : 'a -> unit meth + method postMessage : 'a -> unit meth - method terminate : unit meth - end + method terminate : unit meth +end -and errorEvent = - object - inherit event +and errorEvent = object + inherit event - method message : js_string t readonly_prop + method message : js_string t readonly_prop - method filename : js_string t readonly_prop + method filename : js_string t readonly_prop - method lineno : int readonly_prop + method lineno : int readonly_prop - method colno : int readonly_prop + method colno : int readonly_prop - method error : Unsafe.any readonly_prop - end + method error : Unsafe.any readonly_prop +end -and ['a] messageEvent = - object - inherit event +and ['a] messageEvent = object + inherit event - method data : 'a readonly_prop - end + method data : 'a readonly_prop +end val create : string -> ('a, 'b) worker t diff --git a/lib/js_of_ocaml/xmlHttpRequest.ml b/lib/js_of_ocaml/xmlHttpRequest.ml index 6cb3d16217..e407ad4e3c 100644 --- a/lib/js_of_ocaml/xmlHttpRequest.ml +++ b/lib/js_of_ocaml/xmlHttpRequest.ml @@ -36,66 +36,64 @@ type _ response = | Text : js_string t response | Default : string response -class type xmlHttpRequest = - object ('self) - method onreadystatechange : (unit -> unit) Js.callback Js.writeonly_prop +class type xmlHttpRequest = object ('self) + method onreadystatechange : (unit -> unit) Js.callback Js.writeonly_prop - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method _open : js_string t -> js_string t -> bool t -> unit meth + method _open : js_string t -> js_string t -> bool t -> unit meth - method _open_full : - js_string t - -> js_string t - -> bool t - -> js_string t opt - -> js_string t opt - -> unit meth + method _open_full : + js_string t + -> js_string t + -> bool t + -> js_string t opt + -> js_string t opt + -> unit meth - method setRequestHeader : js_string t -> js_string t -> unit meth + method setRequestHeader : js_string t -> js_string t -> unit meth - method overrideMimeType : js_string t -> unit meth + method overrideMimeType : js_string t -> unit meth - method send : js_string t opt -> unit meth + method send : js_string t opt -> unit meth - method send_blob : #File.blob t -> unit meth + method send_blob : #File.blob t -> unit meth - method send_document : Dom.element Dom.document t -> unit meth + method send_document : Dom.element Dom.document t -> unit meth - method send_formData : Form.formData t -> unit meth + method send_formData : Form.formData t -> unit meth - method abort : unit meth + method abort : unit meth - method status : int readonly_prop + method status : int readonly_prop - method statusText : js_string t readonly_prop + method statusText : js_string t readonly_prop - method getResponseHeader : js_string t -> js_string t opt meth + method getResponseHeader : js_string t -> js_string t opt meth - method getAllResponseHeaders : js_string t meth + method getAllResponseHeaders : js_string t meth - method response : File.file_any readonly_prop + method response : File.file_any readonly_prop - method responseText : js_string t opt readonly_prop + method responseText : js_string t opt readonly_prop - method responseXML : Dom.element Dom.document t opt readonly_prop + method responseXML : Dom.element Dom.document t opt readonly_prop - method responseType : js_string t prop + method responseType : js_string t prop - method withCredentials : bool t writeonly_prop + method withCredentials : bool t writeonly_prop - inherit File.progressEventTarget + inherit File.progressEventTarget - method ontimeout : - ('self t, 'self File.progressEvent t) Dom.event_listener writeonly_prop + method ontimeout : + ('self t, 'self File.progressEvent t) Dom.event_listener writeonly_prop - method upload : xmlHttpRequestUpload t optdef readonly_prop - end + method upload : xmlHttpRequestUpload t optdef readonly_prop +end -and xmlHttpRequestUpload = - object ('self) - inherit File.progressEventTarget - end +and xmlHttpRequestUpload = object ('self) + inherit File.progressEventTarget +end module Event = struct type typ = xmlHttpRequest File.progressEvent t Dom.Event.typ diff --git a/lib/js_of_ocaml/xmlHttpRequest.mli b/lib/js_of_ocaml/xmlHttpRequest.mli index 7db270235a..7fbc739fc5 100644 --- a/lib/js_of_ocaml/xmlHttpRequest.mli +++ b/lib/js_of_ocaml/xmlHttpRequest.mli @@ -37,66 +37,64 @@ type _ response = | Text : js_string t response | Default : string response -class type xmlHttpRequest = - object ('self) - method onreadystatechange : (unit -> unit) Js.callback Js.writeonly_prop +class type xmlHttpRequest = object ('self) + method onreadystatechange : (unit -> unit) Js.callback Js.writeonly_prop - method readyState : readyState readonly_prop + method readyState : readyState readonly_prop - method _open : js_string t -> js_string t -> bool t -> unit meth + method _open : js_string t -> js_string t -> bool t -> unit meth - method _open_full : - js_string t - -> js_string t - -> bool t - -> js_string t opt - -> js_string t opt - -> unit meth + method _open_full : + js_string t + -> js_string t + -> bool t + -> js_string t opt + -> js_string t opt + -> unit meth - method setRequestHeader : js_string t -> js_string t -> unit meth + method setRequestHeader : js_string t -> js_string t -> unit meth - method overrideMimeType : js_string t -> unit meth + method overrideMimeType : js_string t -> unit meth - method send : js_string t opt -> unit meth + method send : js_string t opt -> unit meth - method send_blob : #File.blob t -> unit meth + method send_blob : #File.blob t -> unit meth - method send_document : Dom.element Dom.document t -> unit meth + method send_document : Dom.element Dom.document t -> unit meth - method send_formData : Form.formData t -> unit meth + method send_formData : Form.formData t -> unit meth - method abort : unit meth + method abort : unit meth - method status : int readonly_prop + method status : int readonly_prop - method statusText : js_string t readonly_prop + method statusText : js_string t readonly_prop - method getResponseHeader : js_string t -> js_string t opt meth + method getResponseHeader : js_string t -> js_string t opt meth - method getAllResponseHeaders : js_string t meth + method getAllResponseHeaders : js_string t meth - method response : File.file_any readonly_prop + method response : File.file_any readonly_prop - method responseText : js_string t opt readonly_prop + method responseText : js_string t opt readonly_prop - method responseXML : Dom.element Dom.document t opt readonly_prop + method responseXML : Dom.element Dom.document t opt readonly_prop - method responseType : js_string t prop + method responseType : js_string t prop - method withCredentials : bool t writeonly_prop + method withCredentials : bool t writeonly_prop - inherit File.progressEventTarget + inherit File.progressEventTarget - method ontimeout : - ('self t, 'self File.progressEvent t) Dom.event_listener writeonly_prop + method ontimeout : + ('self t, 'self File.progressEvent t) Dom.event_listener writeonly_prop - method upload : xmlHttpRequestUpload t optdef readonly_prop - end + method upload : xmlHttpRequestUpload t optdef readonly_prop +end -and xmlHttpRequestUpload = - object ('self) - inherit File.progressEventTarget - end +and xmlHttpRequestUpload = object ('self) + inherit File.progressEventTarget +end val create : unit -> xmlHttpRequest t diff --git a/lib/lwt/graphics/graphics_js.ml b/lib/lwt/graphics/graphics_js.ml index 8b9b615d26..3f8ed6c873 100644 --- a/lib/lwt/graphics/graphics_js.ml +++ b/lib/lwt/graphics/graphics_js.ml @@ -22,10 +22,9 @@ open Js_of_ocaml_lwt open! Import include Graphics -class type context_ = - object - method canvas : Dom_html.canvasElement Js.t Js.readonly_prop - end +class type context_ = object + method canvas : Dom_html.canvasElement Js.t Js.readonly_prop +end type context = context_ Js.t diff --git a/lib/tyxml/tyxml_js.ml b/lib/tyxml/tyxml_js.ml index b3ebc80a1f..8989795abd 100644 --- a/lib/tyxml/tyxml_js.ml +++ b/lib/tyxml/tyxml_js.ml @@ -32,12 +32,11 @@ module type XML = and type keyboard_event_handler = Dom_html.keyboardEvent Js.t -> bool and type elt = Dom.node Js.t -class type ['a, 'b] weakMap = - object - method set : 'a -> 'b -> unit Js.meth +class type ['a, 'b] weakMap = object + method set : 'a -> 'b -> unit Js.meth - method get : 'a -> 'b Js.Optdef.t Js.meth - end + method get : 'a -> 'b Js.Optdef.t Js.meth +end let retain = let map : (Dom.node Js.t, Obj.t Js.js_array Js.t) weakMap Js.t = diff --git a/toplevel/lib/jsooTop.ml b/toplevel/lib/jsooTop.ml index 6bfa0d3639..dea1c1a164 100644 --- a/toplevel/lib/jsooTop.ml +++ b/toplevel/lib/jsooTop.ml @@ -78,10 +78,10 @@ let use ffp content = with e -> Sys.remove fname; raise e - [@@if ocaml_version < (4, 14, 0)] +[@@if ocaml_version < (4, 14, 0)] let use ffp content = Toploop.use_silently ffp (String content) - [@@if ocaml_version >= (4, 14, 0)] +[@@if ocaml_version >= (4, 14, 0)] let execute printval ?pp_code ?highlight_location pp_answer s = let lb = Lexing.from_function (refill_lexbuf s (ref 0) pp_code) in