Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Runtime: allow dynlink of precompiled js with separate compilation (#1676)
* Runtime: reimplement the runtime of weak and ephemeron (#1707)
* Lib: Modify Typed_array API for compatibility with WebAssembly
* Lib: add details element and toggle event (#1728)
* Toplevel: no longer set globals for toplevel initialization

## Bug fixes
Expand Down
22 changes: 22 additions & 0 deletions lib/js_of_ocaml/dom_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,14 @@ and clipboardEvent = object
method clipboardData : dataTransfer t readonly_prop
end

and toggleEvent = object
inherit event

method newState : js_string t readonly_prop

method oldState : js_string t readonly_prop
end

and dataTransfer = object
method dropEffect : js_string t prop

Expand Down Expand Up @@ -959,6 +967,8 @@ module Event = struct

let waiting = Dom.Event.make "waiting"

let toggle = Dom.Event.make "toggle"

let make = Dom.Event.make
end

Expand Down Expand Up @@ -1372,6 +1382,16 @@ class type anchorElement = object
method _type : js_string t prop
end

class type detailsElement = object ('self)
inherit element

method open_ : js_string t prop

method name : js_string t prop

method ontoggle : ('self t, toggleEvent t) event_listener prop
end

class type imageElement = object ('self)
inherit element

Expand Down Expand Up @@ -2736,6 +2756,8 @@ module CoerceTo = struct

let del e = unsafeCoerce "del" e

let details e = unsafeCoerce "details" e

let div e = unsafeCoerce "div" e

let dl e = unsafeCoerce "dl" e
Expand Down
22 changes: 22 additions & 0 deletions lib/js_of_ocaml/dom_html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ and clipboardEvent = object
method clipboardData : dataTransfer t readonly_prop
end

and toggleEvent = object
inherit event

method newState : js_string t readonly_prop

method oldState : js_string t readonly_prop
end

and dataTransfer = object
method dropEffect : js_string t prop

Expand Down Expand Up @@ -1190,6 +1198,16 @@ class type anchorElement = object
method _type : js_string t prop
end

class type detailsElement = object ('self)
inherit element

method open_ : js_string t prop

method name : js_string t prop

method ontoggle : ('self t, toggleEvent t) event_listener prop
end

class type imageElement = object ('self)
inherit element

Expand Down Expand Up @@ -2503,6 +2521,8 @@ module Event : sig

val waiting : mediaEvent t typ

val toggle : toggleEvent t typ

val make : string -> 'a typ
end

Expand Down Expand Up @@ -3048,6 +3068,8 @@ module CoerceTo : sig

val del : #element t -> modElement t opt

val details : #element t -> detailsElement t opt

val div : #element t -> divElement t opt

val embed : #element t -> embedElement t opt
Expand Down

0 comments on commit 04c5892

Please sign in to comment.