diff options
Diffstat (limited to 'src/Lib')
-rw-r--r-- | src/Lib/Dom/Element.ml | 3 | ||||
-rw-r--r-- | src/Lib/Dom/Event.ml | 3 | ||||
-rw-r--r-- | src/Lib/Dom/HE.ml | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/Lib/Dom/Element.ml b/src/Lib/Dom/Element.ml index e370cf5..feb6003 100644 --- a/src/Lib/Dom/Element.ml +++ b/src/Lib/Dom/Element.ml @@ -46,3 +46,6 @@ let mount_on base element = external files : Dom.element -> string Js.Array.t = "files" [@@bs.get] + +external focus : Dom.element -> unit = "focus" + [@@bs.send] diff --git a/src/Lib/Dom/Event.ml b/src/Lib/Dom/Event.ml index 9db46f0..5a9790f 100644 --- a/src/Lib/Dom/Event.ml +++ b/src/Lib/Dom/Event.ml @@ -7,6 +7,9 @@ external stop_propagation : Dom.event -> unit = "stopPropagation" external target : Dom.event -> Dom.element = "target" [@@bs.get] +external related_target : Dom.event -> Dom.element Js.Nullable.t = "relatedTarget" + [@@bs.get] + external page_x : Dom.mouseEvent -> float = "pageX" [@@bs.get] diff --git a/src/Lib/Dom/HE.ml b/src/Lib/Dom/HE.ml index 6e658ce..03d2386 100644 --- a/src/Lib/Dom/HE.ml +++ b/src/Lib/Dom/HE.ml @@ -9,3 +9,5 @@ let on_submit f = H.EventAttr ("submit", f) let on_blur f = H.EventAttr ("blur", f) let on_change f = H.EventAttr ("change", f) + +let on_focus f = H.EventAttr ("focus", f) |