---
name: "Eliom_content.Html5.Custom_data.client"
section: "3o"
platform: "linux"
package: "libeliom-ocaml-doc"
version: "4.0.0-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Eliom_content.Html5.Custom_data.client"
---

# Eliom\_content.Html5.Custom\_data.client(3o)

no description

## NAME

Eliom\_content.Html5.Custom\_data - no description

## Module

Module   Eliom\_content.Html5.Custom\_data

## Documentation

Module **Custom\_data**\
  :  **sig end**

*type* **'a** *t*

Custom data with values of type  **'a** .

*val create* :  **name:string -\>** **?default:'a -\>** **to\_string:('a -\> string) -\>** **of\_string:(string -\> 'a) -\> unit -\> 'a t**

Create a custom data field by providing string conversion functions. If the  **default** is provided, calls to  return that instead of throwing an exception  **Not\_found** .

*val create\_json* :  **name:string -\>** **?default:'a -\> 'a Deriving\_Json.t -\> 'a t**

Create a custom data from a Json-deriving type.

*val attrib* :  **'a t -\>** **'a -\> \[\> \`User\_data \] Eliom\_content.Html5.attrib**

**attrib my\_data value** creates a HTML5 attribute for the custom-data type  **my\_data** with value  **value** for injecting it into an a HTML5 tree ().

*val get\_dom* :  **Dom\_html.element Js.t -\> 'a t -\> 'a**

*val set\_dom* :  **Dom\_html.element Js.t -\> 'a t -\> 'a -\> unit**
