-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathraw.mli
42 lines (34 loc) · 1.08 KB
/
raw.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
open Base
open Js_of_ocaml
module Attrs : sig
type t = private Js.Unsafe.any
val create : unit -> t
val has_property : t -> Js.js_string Js.t -> bool
val has_attribute : t -> Js.js_string Js.t -> bool
val set_property : t -> Js.js_string Js.t -> Js.Unsafe.any -> unit
val set_attribute : t -> Js.js_string Js.t -> Js.Unsafe.any -> unit
end
module Node : sig
type t
val node : Js.js_string Js.t -> Attrs.t -> t Js.js_array Js.t -> string option -> t
val text : string -> t
val svg : Js.js_string Js.t -> Attrs.t -> t Js.js_array Js.t -> string option -> t
val to_dom : t -> Dom_html.element Js.t
end
module Patch : sig
type t
val create : previous:Node.t -> current:Node.t -> t
val apply : Dom_html.element Js.t -> t -> Dom_html.element Js.t
val is_empty : t -> bool
end
module Widget : sig
type t = Node.t
val create
: ?vdom_for_testing:Node.t Lazy.t
-> ?destroy:('s -> (#Dom_html.element as 'a) Js.t -> unit)
-> ?update:('s -> 'a Js.t -> 's * 'a Js.t)
-> id:('s * 'a Js.t) Type_equal.Id.t
-> init:(unit -> 's * 'a Js.t)
-> unit
-> t
end