danielnarey/elm-semantic-dom/1.1.0

NOTE: this package is not compatible with Elm 0.19.1

Dom

Type declarations

type alias Node msg =
Node msg

Alias for VirtualDom.Node — the native data structure Elm uses to represent HTML, SVG, and potentially other namespaced elements

type alias Property msg =
Property msg

Alias for VirtualDom.Property — the native data structure Elm uses to represent both content attributes and IDL attributes (a.k.a. "JavaScript properties")

type alias Element msg =
{ tag : String
, attributes : List (Property msg)
, classes : List String
, children : List (Node msg)
, text : String
, namespace : String
, keys : List String
}

An Elm record that contains all of the data needed to construct a VirtualDom.Node

By using a record to temporarily store data about a node, we can partially construct that node with some data, but delay building it until all of the data has been assembled. In this way, all of a node's data is available to be modified until it is either placed in a container element or passed as an argument to the Dom.Element.toNode function.