diff options
author | Joris | 2020-08-09 18:46:05 +0200 |
---|---|---|
committer | Joris | 2020-08-09 18:46:05 +0200 |
commit | 2936f06576997bffe7903ea840df563a408efc21 (patch) | |
tree | 0fd9c802c73df3e506ac0f65cdd2f48ba3de6a60 /src/Lib/Dom | |
parent | 225068497c5fd41da12030a6bbf58a0fc9c294d0 (diff) |
Improve autocompletion usage
Diffstat (limited to 'src/Lib/Dom')
-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) |