Fmlib_browser.HtmlVirtual Dom
A node of the virtual dom represents a node in the dom of the browser. Basically there are text nodes and element nodes.
Note that there are many, many, many specific elements and many, many specific attributes . I.e. if you write a function like
let view ... =
let open Html in
let open Attribute in
div [] [
h1 [] [text "Chapter 1"];
p [] [text "...."];
...
]some of the attribute names and html node names might shadow function arguments or other local names in your module. Furthermore there are nodes with the same name as an attribute (e.g. label). The name clash might not be immediately visible because the OCaml compiler complains about some type error.
In order to avoid a lot of typing by not opening the namespaces it might be recommendable to write the above function in the following style
let view ... =
let module H = Html in
let module A = Attribute in
H.div [] [
H.h1 [] [text "Chapter 1"];
H.p [] [text "...."];
...
]val text : string -> 'msg ttext str Create a text node.
val node : string -> 'msg Attribute.t list -> 'msg t list -> 'msg tnode tag attrs children
Create an html element with a tagname, a list of attributes and a list of children.
val node_ns :
string ->
string ->
'msg Attribute.t list ->
'msg t list ->
'msg tnode namespace tag attrs children
Like node, but creates the node within a namespace e.g. "http://www.w3.org/2000/svg" for svg elements.
val svg_node : string -> 'msg Attribute.t list -> 'msg t list -> 'msg tsvg_node tag attrs children
Create an svg element with a tagname, a list of attributes and a list of children. An svg element is a node in the namespace "http://www.w3.org/2000/svg".
map f vdom
Map a virtual dom vdom creating messages of type 'a to a virtual dom creating messages of type 'b.
val keyed : string -> 'msg Attribute.t list -> (string * 'msg t) list -> 'msg tkeyed tag attrs children
Like node, but add a unique identifier to each child node. This makes adding, removing and modifying child nodes more efficient. The dom diffing algorithm compares child nodes with the same identifier.
Reference nodes are nodes whose content is not controlled by the virtual dom. In the virtual dom the reference nodes are inserted by their name.
The contents of reference nodes is controlled via Command.set_reference.
Reference nodes are persistent. Once referenced by reference or initialized or updated by Command.set_reference they exist. Once existing they can be modidfied by Command.set_reference.
The virtual dom can use them or not. They remain in existence.
Reference nodes are a means to improve performance. In the following examples reference nodes might be useful:
val reference : string -> 'msg tInsert a reference element into the dom.
val address : 'msg Attribute.t list -> 'msg t list -> 'msg taddress attrs children
Defines a section containing contact information about a person or organization.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/address
val article : 'msg Attribute.t list -> 'msg t list -> 'msg tarticle attrs children
Defines self-contained content, which is usable independently of the page. Examples include blog posts, user-submitted comments or interactive widgets.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/article
val aside : 'msg Attribute.t list -> 'msg t list -> 'msg taside attrs children
Defines content that is not directly related to the main content of the page. This content is often presented as a sidebar or a call-out box.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/aside
footer attrs children
Defines the footer for a page or section. It typically contains information about the author, copyright data, or links to related documents.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/footer
val header : 'msg Attribute.t list -> 'msg t list -> 'msg theader attrs children
Defines the header of a page or section. It typically contains a logo, the title of the page and navigation elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/header
val h1 : 'msg Attribute.t list -> 'msg t list -> 'msg th1 attrs children
Defines a section heading. <h1> is the highest section level and <h6> is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val h2 : 'msg Attribute.t list -> 'msg t list -> 'msg th2 attrs children
Defines a section heading. h1 is the highest section level and h6 is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val h3 : 'msg Attribute.t list -> 'msg t list -> 'msg th3 attrs children
Defines a section heading. h1 is the highest section level and h6 is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val h4 : 'msg Attribute.t list -> 'msg t list -> 'msg th4 attrs children
Defines a section heading. h1 is the highest section level and h6 is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val h5 : 'msg Attribute.t list -> 'msg t list -> 'msg th5 attrs children
Defines a section heading. h1 is the highest section level and h6 is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val h6 : 'msg Attribute.t list -> 'msg t list -> 'msg th6 attrs children
Defines a section heading. h1 is the highest section level and h6 is the lowest.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
val hgroup : 'msg Attribute.t list -> 'msg t list -> 'msg thgroup attrs children
Represents a heading grouped with any secondary content, such as subheadings, an alternative title, or a tagline.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hgroup
val main : 'msg Attribute.t list -> 'msg t list -> 'msg tmain attrs children
Defines the main or most important content of the page. There can be only one main element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/main
nav attrs children
Represents a section that provides navigation links.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/nav
val section : 'msg Attribute.t list -> 'msg t list -> 'msg tsection attrs children
Represents a generic section of a document. Use this if the content cannot be represented by a more specific semantic element. A section should have a heading.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/section
val search : 'msg Attribute.t list -> 'msg t list -> 'msg tsearch attrs children
Represents a section that contains controls for performing a search or filtering operation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/search
val blockquote : 'msg Attribute.t list -> 'msg t list -> 'msg tblockquote attrs children
Represents a block of quoted text. The cite attribute allows specifying a source URL and the title of the source can be given using the cite element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/blockquote
val dd : 'msg Attribute.t list -> 'msg t list -> 'msg tdd attrs children
Provides the definition or description of the dt element listed before it.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dd
val div : 'msg Attribute.t list -> 'msg t list -> 'msg tval dl : 'msg Attribute.t list -> 'msg t list -> 'msg tval dt : 'msg Attribute.t list -> 'msg t list -> 'msg tdt attrs children
Represents a term which is defined / described by the subsequent dd element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dt
val figcaption : 'msg Attribute.t list -> 'msg t list -> 'msg tfigcaption attrs children
Represents the caption or legend of a figure.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figcaption
val figure : 'msg Attribute.t list -> 'msg t list -> 'msg tfigure attrs children
Defines a figure which contains some content and a figcaption. Examples for suitable content are pictures, diagrams, quotes or code snippets.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figure
val hr : 'msg Attribute.t list -> 'msg t list -> 'msg thr attrs children
Represents a thematic break between paragraphs.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hr
val li : 'msg Attribute.t list -> 'msg t list -> 'msg tli attrs children
Defines an item of an ordered or unordered list.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/li
menu attrs children
Represents a list of menu entries, such as navigation links or buttons. This can be used as a semantic alternative to ol.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/menu
val ol : 'msg Attribute.t list -> 'msg t list -> 'msg tol attrs children
Represents an ordered list of items.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ol
val p : 'msg Attribute.t list -> 'msg t list -> 'msg tp attrs children
Represents a text paragraph.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/p
val pre : 'msg Attribute.t list -> 'msg t list -> 'msg tpre attrs children
Represents preformatted text which is to be presented exactly as written.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/pre
val ul : 'msg Attribute.t list -> 'msg t list -> 'msg tul attrs children
Defines an unordered list of items.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul
val a : 'msg Attribute.t list -> 'msg t list -> 'msg ta attrs children
Represents a hyperlink.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a
val abbr : 'msg Attribute.t list -> 'msg t list -> 'msg tabbr attrs children
Represents an abbreviation or an acronym. The title attribute allows specifying the full expansion for the abbreviation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/abbr
val b : 'msg Attribute.t list -> 'msg t list -> 'msg tb attrs children
Used to draw the reader's attention to the element's contents. This is not meant to indicate special importance. Use strong for that instead.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/b
val bdi : 'msg Attribute.t list -> 'msg t list -> 'msg tbdi attrs children
Represents text that should be treated in isolation from its surrounding when it comes to text directionality. This allows embedding text snippets with a different or unknown directionality.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi
val bdo : 'msg Attribute.t list -> 'msg t list -> 'msg tbdo attrs children
Overrides the current directionality of text using the dir attribute, so that the text within is rendered in a different direction.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdo
val br : 'msg Attribute.t list -> 'msg t list -> 'msg tbr attrs children
Produces a line break.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/br
val cite : 'msg Attribute.t list -> 'msg t list -> 'msg tcite attrs children
Represents the title of a cited work.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite
val code : 'msg Attribute.t list -> 'msg t list -> 'msg tcode attrs children
Represents a piece of computer code.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/code
val data : 'msg Attribute.t list -> 'msg t list -> 'msg tdata attrs children
Links a piece of content with a machine-readable representation (specified in the value attribute).
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/data
val dfn : 'msg Attribute.t list -> 'msg t list -> 'msg tdfn attrs children
Represents a term that is defined in the surrounding element. If it has an id attribute, it can be linked to with an a element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dfn
val em : 'msg Attribute.t list -> 'msg t list -> 'msg tem attrs children
Marks text as emphasized, e.g. to signal that a world should be stressed. Typically the text is rendered in italic.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/em
val i : 'msg Attribute.t list -> 'msg t list -> 'msg ti attrs children
Represents a range of text that is set off from the normal text. Possible reasons for that are that the text should be read in different voice or it is a technical term or a term from another language. Typically the text is rendered in italic.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/i
val kbd : 'msg Attribute.t list -> 'msg t list -> 'msg tkbd attrs children
Represents the textual representation of some user input, such as a keyboard shortcut.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/kbd
val mark : 'msg Attribute.t list -> 'msg t list -> 'msg tmark attrs children
Represents text that is marked or highlighted due to its relevance in the enclosing context.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/mark
val q : 'msg Attribute.t list -> 'msg t list -> 'msg tq attrs children
Represents a short inline quotation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/q
val rp : 'msg Attribute.t list -> 'msg t list -> 'msg trp attrs children
Used to provide fall-back parentheses for browsers that do not support the display of ruby annotations using the ruby element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rp
val rt : 'msg Attribute.t list -> 'msg t list -> 'msg trt attrs children
Specifies the ruby text component of a ruby annotation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rt
val ruby : 'msg Attribute.t list -> 'msg t list -> 'msg truby attrs children
Represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ruby
val s : 'msg Attribute.t list -> 'msg t list -> 'msg ts attrs children
Represent text that is no longer relevant or no longer accurate.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/s
val samp : 'msg Attribute.t list -> 'msg t list -> 'msg tsamp attrs children
Allows embedding the output of a computer program as inline text.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/samp
val small : 'msg Attribute.t list -> 'msg t list -> 'msg tsmall attrs children
Represents side-comments and small print, like copyright notices and legal text.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/small
val span : 'msg Attribute.t list -> 'msg t list -> 'msg tval strong : 'msg Attribute.t list -> 'msg t list -> 'msg tstrong attrs children
Represents important text. Typically it is rendered with a bold font.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/strong
val sub : 'msg Attribute.t list -> 'msg t list -> 'msg tsub attrs children
Defines text that should be displayed as subscript.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sub
val sup : 'msg Attribute.t list -> 'msg t list -> 'msg tsup attrs children
Defines text that should be displayed as superscript.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sup
val time : 'msg Attribute.t list -> 'msg t list -> 'msg ttime attrs children
Represents a data and time value. The datetime attribute allows specifying this value in a machine-readable format.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/time
val u : 'msg Attribute.t list -> 'msg t list -> 'msg tu attrs children
Defines text that should be rendered with a non-textual annotation. Typically the text is rendered with an underline.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/u
val var : 'msg Attribute.t list -> 'msg t list -> 'msg tvar attrs children
Represents the name of a variable in a mathematical expression or a programming context.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/var
val wbr : 'msg Attribute.t list -> 'msg t list -> 'msg twbr attrs children
Marks a position within a word where the browser may optionally insert a line break. Can be used when the standard line-breaking rules don't yield the desired outcome.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/wbr
val area : 'msg Attribute.t list -> 'msg t list -> 'msg tarea attrs children
Defines an area inside an image map that has predefined clickable areas.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/area
val audio : 'msg Attribute.t list -> 'msg t list -> 'msg taudio attrs children
Used to embed sound content in documents.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/audio
val img : 'msg Attribute.t list -> 'msg t list -> 'msg timg attrs children
Embeds an image into the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img
val map_ : 'msg Attribute.t list -> 'msg t list -> 'msg tmap_ attrs children
Defines an image map which is an image with several clickable areas.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/map
val track : 'msg Attribute.t list -> 'msg t list -> 'msg tval video : 'msg Attribute.t list -> 'msg t list -> 'msg tvideo attrs children
Embeds a media player which supports video playback into the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/video
val embed : 'msg Attribute.t list -> 'msg t list -> 'msg tembed attrs children
Embeds external content, provided by an external application, into the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/embed
val fencedframe : 'msg Attribute.t list -> 'msg t list -> 'msg tfencedframe attrs children
Represents a nested browsing context, like iframe but with more native privacy features built in.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fencedframe
val iframe : 'msg Attribute.t list -> 'msg t list -> 'msg tiframe attrs children
Represents a nested browsing context, embedding another HTML page into the current one.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe
val object_ : 'msg Attribute.t list -> 'msg t list -> 'msg tobject_ attrs children
Represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/object
val picture : 'msg Attribute.t list -> 'msg t list -> 'msg tpicture attrs children
Contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture
val source : 'msg Attribute.t list -> 'msg t list -> 'msg tval canvas : 'msg Attribute.t list -> 'msg t list -> 'msg tcanvas attrs children
Allows drawing graphics and animations using the canvas API or the WebGL API.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/canvas
val del : 'msg Attribute.t list -> 'msg t list -> 'msg tdel attrs children
Represents a range of text that has been removed from the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/del
val ins : 'msg Attribute.t list -> 'msg t list -> 'msg tins attrs children
Represents a range of text that has been added to the document.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ins
val caption : 'msg Attribute.t list -> 'msg t list -> 'msg tcaption attrs children
Specifies the title of a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/caption
val col : 'msg Attribute.t list -> 'msg t list -> 'msg tcol attrs children
Defines one or more columns in a column group.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/col
val colgroup : 'msg Attribute.t list -> 'msg t list -> 'msg tcolgroup attrs children
Defines a group of columns within a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/colgroup
val table : 'msg Attribute.t list -> 'msg t list -> 'msg ttable attrs children
Represents tabular data, that is data in two dimensions.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table
val tbody : 'msg Attribute.t list -> 'msg t list -> 'msg ttobdy attrs children
Defines the set of table rows containing the table's main data.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tobdy
val td : 'msg Attribute.t list -> 'msg t list -> 'msg ttd attrs children
Defines a data cell of a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/td
val tfoot : 'msg Attribute.t list -> 'msg t list -> 'msg ttfoot attrs children
Defines the set of table rows, located at the bottom of the table, containing summaries about the table's columns.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tfoot
val th : 'msg Attribute.t list -> 'msg t list -> 'msg tth attrs children
Defines a header cell for one or more data cells.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/th
val thead : 'msg Attribute.t list -> 'msg t list -> 'msg tthead attrs children
Defines the set of table rows, located at the top of the table, containing the titles of the table's columns.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/thead
val tr : 'msg Attribute.t list -> 'msg t list -> 'msg ttr attrs children
Defines a row of a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tr
val button : 'msg Attribute.t list -> 'msg t list -> 'msg tbutton attrs children
Defines a button.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button
val datalist : 'msg Attribute.t list -> 'msg t list -> 'msg tdatalist attrs children
Pre-defines a list of options for use in other input controls.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/datalist
val fieldset : 'msg Attribute.t list -> 'msg t list -> 'msg tfieldset attrs children
Used to group several controls and labels within a form.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset
val form : 'msg Attribute.t list -> 'msg t list -> 'msg tform attrs children
Represents a section containing user input controls and a submit button. Allows submitting user input to the server.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form
val input : 'msg Attribute.t list -> 'msg t list -> 'msg tinput attrs children
Allows a wide variety of user input, e.g. text, numbers, colors, date and time.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input
val label : 'msg Attribute.t list -> 'msg t list -> 'msg tlabel attrs children
Specifies a caption for another element. This is often used to describe user input elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/label
val legend : 'msg Attribute.t list -> 'msg t list -> 'msg tlegend attrs children
Represents a caption for the content of a fieldset.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/legend
val meter : 'msg Attribute.t list -> 'msg t list -> 'msg tmeter attrs children
Represents either a scalar value or fractional value within a known range.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meter
val optgroup : 'msg Attribute.t list -> 'msg t list -> 'msg tval option : 'msg Attribute.t list -> 'msg t list -> 'msg tval output : 'msg Attribute.t list -> 'msg t list -> 'msg toutput attrs children
A container for displaying the results of a calculation.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/output
val progress : 'msg Attribute.t list -> 'msg t list -> 'msg tprogress attrs children
Displays an indicator showing the completion progress of a task.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress
val select : 'msg Attribute.t list -> 'msg t list -> 'msg tselect attrs children
Represents a control that allows selecting out of multiple options.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select
val selectedcontent : 'msg Attribute.t list -> 'msg t list -> 'msg tval textarea : 'msg Attribute.t list -> 'msg t list -> 'msg ttextarea attrs children
Represents a multi-line text editing control.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/textarea
val details : 'msg Attribute.t list -> 'msg t list -> 'msg tdetails attrs children
Represents a widget that the user can click to reveal additional information. A short summary of the contents must be provided in a summary element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details
val dialog : 'msg Attribute.t list -> 'msg t list -> 'msg tdialog attrs children
Represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog
val summary : 'msg Attribute.t list -> 'msg t list -> 'msg tsummary attrs children
Provides a summary of the information hidden in a details element. Clicking the summary will toggle the "open" state of the details element.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/summary