Browser_extraSourceThis library provides utility functions that complement the bindings in the Browser and Browser_expert libraries.
Coercion provides utility functions for common coercions known to be equivalent. Please note that some of these coercions are possibly unsafe if a subclass overrides an ancestor class method with a completely different return type
Event_type enumerates all *known event types allow with the interface(s) they use and the event targets that support them.
val add_event_listener_with_cleanup :
?use_capture:bool ->
Browser_types.event_target Browser_js_types.Js.t ->
type_:Browser_js_types.Js.js_string Browser_js_types.Js.t ->
listener:('a -> event:Browser_types.event Browser_js_types.Js.t -> unit) ->
Browser_js_types.event_idadd_event_listener_with_cleanup add the provided listener to the EventTarget and returns a cleanup function that removes the event listener when called.
remove_event_listener invokes the cleanup function returned by the add_event_listener_with_cleanup