Skip to content

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
===== dev =====
2+
* Add support for the `toggle` and `beforetoggle` events of the `popover` API
3+
** Also adds support for the `toggle` event for `details` elements
4+
15
===== 11.1 =====
26
* Compatibility with WASM
37

src/lib/eliom_content.client.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ module Html : sig
666666
val onreturn : ('a, Dom_html.keyboardEvent) ev_unit
667667
val onchange : ('a, Dom_html.event) ev
668668
val onchange_select : ('a, Dom_html.event) ev
669+
val onbeforetoggle : ('a, Dom_html.toggleEvent) ev
670+
val ontoggle : ('a, Dom_html.toggleEvent) ev
669671
end
670672

671673
module Attr : sig

src/lib/eliom_content_.client.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,14 @@ module Html = struct
612612
let onchange_select elt f =
613613
let elt = get_unique_elt_select "Ev.onchange_select" elt in
614614
elt##.onchange := bool_cb f
615+
616+
let onbeforetoggle elt f =
617+
let elt = get_unique_elt "Ev.onbeforetoggle" elt in
618+
elt##.onbeforetoggle := bool_cb f
619+
620+
let ontoggle elt f =
621+
let elt = get_unique_elt "Ev.ontoggle" elt in
622+
elt##.ontoggle := bool_cb f
615623
end
616624

617625
module Attr = struct

src/lib/eliom_content_core.client.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ module Html = struct
353353
let a_onabort s = A.Unsafe.string_attrib "onabort" s
354354
let a_onafterprint s = A.Unsafe.string_attrib "onafterprint" s
355355
let a_onbeforeprint s = A.Unsafe.string_attrib "onbeforeprint" s
356+
let a_onbeforetoggle s = A.Unsafe.string_attrib "onbeforetoggle" s
356357
let a_onbeforeunload s = A.Unsafe.string_attrib "onbeforeunload" s
357358
let a_onblur s = A.Unsafe.string_attrib "onblur" s
358359
let a_oncanplay s = A.Unsafe.string_attrib "oncanplay" s
@@ -393,6 +394,7 @@ module Html = struct
393394
let a_onsubmit s = A.Unsafe.string_attrib "onsubmit" s
394395
let a_onsuspend s = A.Unsafe.string_attrib "onsuspend" s
395396
let a_ontimeupdate s = A.Unsafe.string_attrib "ontimeupdate" s
397+
let a_ontoggle s = A.Unsafe.string_attrib "ontoggle" s
396398
let a_onundo s = A.Unsafe.string_attrib "onundo" s
397399
let a_onunload s = A.Unsafe.string_attrib "onunload" s
398400
let a_onvolumechange s = A.Unsafe.string_attrib "onvolumechange" s

src/lib/eliom_content_core.client.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ module Html : sig
348348
val a_onabort : string -> [> `OnAbort] A.attrib
349349
val a_onafterprint : string -> [> `OnAfterPrint] A.attrib
350350
val a_onbeforeprint : string -> [> `OnBeforePrint] A.attrib
351+
val a_onbeforetoggle : string -> [> `OnBeforeToggle] A.attrib
351352
val a_onbeforeunload : string -> [> `OnBeforeUnload] A.attrib
352353
val a_onblur : string -> [> `OnBlur] A.attrib
353354
val a_oncanplay : string -> [> `OnCanPlay] A.attrib
@@ -388,6 +389,7 @@ module Html : sig
388389
val a_onsubmit : string -> [> `OnSubmit] A.attrib
389390
val a_onsuspend : string -> [> `OnSuspend] A.attrib
390391
val a_ontimeupdate : string -> [> `OnTimeUpdate] A.attrib
392+
val a_ontoggle : string -> [> `OnToggle] A.attrib
391393
val a_onundo : string -> [> `OnUndo] A.attrib
392394
val a_onunload : string -> [> `OnUnload] A.attrib
393395
val a_onvolumechange : string -> [> `OnVolumeChange] A.attrib

src/lib/eliom_content_core.server.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ module Html = struct
371371
let a_onabort s = A.Unsafe.string_attrib "onabort" s
372372
let a_onafterprint s = A.Unsafe.string_attrib "onafterprint" s
373373
let a_onbeforeprint s = A.Unsafe.string_attrib "onbeforeprint" s
374+
let a_onbeforetoggle s = A.Unsafe.string_attrib "onbeforetoggle" s
374375
let a_onbeforeunload s = A.Unsafe.string_attrib "onbeforeunload" s
375376
let a_onblur s = A.Unsafe.string_attrib "onblur" s
376377
let a_oncanplay s = A.Unsafe.string_attrib "oncanplay" s
@@ -411,6 +412,7 @@ module Html = struct
411412
let a_onsubmit s = A.Unsafe.string_attrib "onsubmit" s
412413
let a_onsuspend s = A.Unsafe.string_attrib "onsuspend" s
413414
let a_ontimeupdate s = A.Unsafe.string_attrib "ontimeupdate" s
415+
let a_ontoggle s = A.Unsafe.string_attrib "ontoggle" s
414416
let a_onundo s = A.Unsafe.string_attrib "onundo" s
415417
let a_onunload s = A.Unsafe.string_attrib "onunload" s
416418
let a_onvolumechange s = A.Unsafe.string_attrib "onvolumechange" s

src/lib/eliom_content_core.server.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ module Html : sig
216216
val a_onabort : string -> [> `OnAbort] A.attrib
217217
val a_onafterprint : string -> [> `OnAfterPrint] A.attrib
218218
val a_onbeforeprint : string -> [> `OnBeforePrint] A.attrib
219+
val a_onbeforetoggle : string -> [> `OnBeforeToggle] A.attrib
219220
val a_onbeforeunload : string -> [> `OnBeforeUnload] A.attrib
220221
val a_onblur : string -> [> `OnBlur] A.attrib
221222
val a_oncanplay : string -> [> `OnCanPlay] A.attrib
@@ -256,6 +257,7 @@ module Html : sig
256257
val a_onsubmit : string -> [> `OnSubmit] A.attrib
257258
val a_onsuspend : string -> [> `OnSuspend] A.attrib
258259
val a_ontimeupdate : string -> [> `OnTimeUpdate] A.attrib
260+
val a_ontoggle : string -> [> `OnToggle] A.attrib
259261
val a_onundo : string -> [> `OnUndo] A.attrib
260262
val a_onunload : string -> [> `OnUnload] A.attrib
261263
val a_onvolumechange : string -> [> `OnVolumeChange] A.attrib

0 commit comments

Comments
 (0)