Unicorn_jsoo.AHTML attributes and properties.
We don't differentiate betwen children nodes and attributes/properties. The attributes specified inside an HTML node attach to their closest parent node:
H.div ( ... & A.class_ (fun _ -> "foo") & ... )will produce the HTML <div class="foo">...</div>
val id : ( 'a -> string ) -> 'a tval class_ : ( 'a -> string ) -> 'a tval style : ( 'a -> string ) -> 'a tval for_ : ( 'a -> string ) -> 'a tval disabled : ( 'a -> bool ) -> 'a tval tabindex : ( 'a -> int ) -> 'a tval placeholder : ( 'a -> string ) -> 'a tval autofocus : ( 'a -> bool ) -> 'a tConsider submitting a PR if you find yourself using this!
val make_string : string -> ( 'a -> string ) -> 'a tmake_string attr value attaches an attribute/property to its HTML parent node.
val make_int : string -> ( 'a -> int ) -> 'a tmake_int attr value attaches an integer attribute/property to its HTML parent node.
val make_bool : string -> ( 'a -> bool ) -> 'a tmake_string attr value attaches a boolean attribute/property to its HTML parent node.