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

Module Eliom_content.Html.Id

module Id : sig..end

Node identifiers


type +'a id

The type of global HTML element identifier.

val new_elt_id : ?global:bool -> unit -> 'a id

The function new_elt_id () creates a new global HTML element identifier (see the Eliom manual for more information on global element).

val create_named_elt : 
  id:'a id ->
  'a Eliom_content.Html.elt -> 'a Eliom_content.Html.elt

The function create_named_elt ~id elt create a copy of the element elt that will be sent to client with the reference id.

val create_global_elt : 
  'a Eliom_content.Html.elt -> 'a Eliom_content.Html.elt

The function create_named_elt elt is equivalent to create_named_elt ~id:(new_elt_id ()) elt.

val create_request_elt : 
  ?reset:bool -> 'a Eliom_content.Html.elt -> 'a Eliom_content.Html.elt

create_request_elt ?reset elt creates a referable copy of elt. If ~reset = true is provided (default: false), a new ID is created even if elt has an ID already.

val have_id : 'a id -> 'b Eliom_content.Html.elt -> bool