Vdom.Attrval create : Base.string -> Base.string -> tcreate name value creates a simple string-only attribute
val create_float : Base.string -> Base.float -> tcreate_float name float creates a simple float-only attribute
val string_property : Base.string -> Base.string -> tstring_property name value creates a simple string-only property
val bool_property : Base.string -> Base.bool -> tbool_property name value creates a simple bool-only property
val property : Base.string -> Js_of_ocaml.Js.Unsafe.any -> tproperty name value creates a property with a generic value
This function does not affect hooks, styles, classes, or on_* handlers, since warnings due to merging those can be avoided. It allows disabling warnings for attributes that are unmergeable. Note that no merging behavior is changed by this function - it only changes whether warnings are emitted.
Example: If href is already on a node, then adding a suppress_merge_warning (href input) attribute to the node will not trigger a warning. However, adding another href which does not use suppress_merge_warnings to the node will again emit a warning. In other words, this function only suppresses warnings for an instance of an attribute, not all attributes of the same type. *
val create_hook : Base.string -> Virtual_dom__.Hooks.t -> tcreate_hook name hook creates a hook attribute with a name
many merges several attributes into one. It merges hooks, on_* event handlers, classes, and styles.
Input.combine functionval empty : tEquivalent to many []. It adds no attributes to the DOM.
val checked : tval class_ : Base.string -> tval classes : Base.string Base.list -> tval classes' : Base.Set.M(Base.String).t -> tval disabled : tval for_ : Base.string -> tval href : Base.string -> tval target : Base.string -> tval id : Base.string -> tval name : Base.string -> tval placeholder : Base.string -> tval selected : tval readonly : tval min : Base.float -> tval max : Base.float -> tval type_ : Base.string -> tval value : Base.string -> tval value_prop : Base.string -> tval title : Base.string -> tval src : Base.string -> tval on_focus :
(Js_of_ocaml.Dom_html.focusEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_blur :
(Js_of_ocaml.Dom_html.focusEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tmodule Unmerged_warning_mode : sig ... endval on_input :
(Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t ->
Base.string ->
Base.unit Ui_effect.t) ->
ton_input fires every time the input changes, i.e., whenever a key is pressed in the input field. The current contents are returned as an OCaml string as a convenience
val on_change :
(Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t ->
Base.string ->
Base.unit Ui_effect.t) ->
ton_change fires when the input is complete, i.e., when enter is pressed in the input field or the input field loses focus. The current contents are returned as an OCaml string as a convenience
val on_file_input :
(Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t ->
Js_of_ocaml.File.fileList Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
ton_file_input is like on_input but for file picker input elements (i.e. type=file). Instead of passing the value of the input as a string, the list of selected files is passed.
See Vdom_input_widgets.File_select, or, if you are a bonsai user, Bonsai_web_ui_form.Elements.File_select, for a convenient API that wraps this.
val on_click :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_double_click :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_drag :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_dragstart :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_dragend :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_dragenter :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_dragleave :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_dragover :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_drop :
(Js_of_ocaml.Dom_html.dragEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mousemove :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mouseup :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mousedown :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mouseenter :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mouseleave :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mouseover :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mouseout :
(Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_keyup :
(Js_of_ocaml.Dom_html.keyboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_keypress :
(Js_of_ocaml.Dom_html.keyboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_keydown :
(Js_of_ocaml.Dom_html.keyboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_scroll :
(Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_submit :
(Js_of_ocaml.Dom_html.submitEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_pointerdown :
(Js_of_ocaml.Dom_html.pointerEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_pointerup :
(Js_of_ocaml.Dom_html.pointerEvent Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_mousewheel :
(Js_of_ocaml.Dom_html.mousewheelEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_copy :
(Js_of_ocaml.Dom_html.clipboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_cut :
(Js_of_ocaml.Dom_html.clipboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_paste :
(Js_of_ocaml.Dom_html.clipboardEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tval on_reset :
(Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t -> Base.unit Ui_effect.t) ->
tval on_animationend :
(Js_of_ocaml.Dom_html.animationEvent Js_of_ocaml.Js.t ->
Base.unit Ui_effect.t) ->
tmodule Multi : sig ... endA collection of CSS attributes.
module Always_focus_hook : sig ... endmodule Single_focus_hook () : sig ... endmodule Expert : sig ... endmodule Hooks : sig ... endmodule Global_listeners : sig ... endHooks to set mouse events listeners on window. This is needed as if we only set them on individual elements we will miss ones that happen outside of the viewport