diff options
Diffstat (limited to 'src/Dom/EventTarget.ml')
-rw-r--r-- | src/Dom/EventTarget.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Dom/EventTarget.ml b/src/Dom/EventTarget.ml index 946a518..d1b0c02 100644 --- a/src/Dom/EventTarget.ml +++ b/src/Dom/EventTarget.ml @@ -1 +1,4 @@ -external value : Dom.eventTarget -> string option = "value" [@@bs.get] +external nullableValue : Dom.eventTarget -> string Js.Nullable.t = "value" + [@@bs.get] + +let value eventTarget = nullableValue eventTarget |> Js.Nullable.toOption |