hecrj/html-parser/1.1.0

NOTE: the latest version is 2.4.0

Html.Parser.Util

Utility functions that may help you digging into the contents.

Virtual DOM

toVirtualDom : List Node -> List (Html msg)

Converts nodes to virtual dom nodes.

toVirtualDomSvg : List Node -> List (Svg msg)

Converts nodes to virtual dom SVG nodes.

Note: If node list contains <svg> tag, you can use toVirtualDom instead. Otherwise, use this function.

svg : Svg msg
svg =
    parse """<circle cx="40" cy="40" r="24" style="stroke:#006600; fill:#00cc00"/>"""
        |> toVirtualDomSvg
        |> Svg.svg []