Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Tyxml_js.Register

module Register : sig..end

val html : 
  ?head:Html_types.head Tyxml_js.Html.elt ->
  Html_types.body Tyxml_js.Html.elt -> unit

Register.html head body uses the given head and body elements as document. It replaces the previous body and head.

head and body can be reactive.

val body : 
  ?keep:bool ->
  [< Html_types.body_content ] Tyxml_js.Html.elt list -> unit

Register.body elements add elements as children of body. If keep is false (default is true), the children of the body are removed before adding the new elements.

val head : 
  ?keep:bool ->
  [< Html_types.head_content ] Tyxml_js.Html.elt list -> unit

Register.head elements add elements as children of body. If keep is false (default is true), the children of the head are removed before adding the new elements.

val id : ?keep:bool -> string -> 'a Tyxml_js.Html.elt list -> unit

Register.id "some_id" elements add elements as children of the node with the id "some_id". If keep is false (default is true), the children of the node are removed before adding the new elements.

Beware, this function ignores tyxml's type information.