Press.HTML.Element (press v0.1.0)

Copy Markdown View Source

An HTML element node in the DOM produced by Press.HTML.Parser.

tag and attribute names are always lowercase (see Press.HTML.Parser moduledoc). attrs maps attribute name to its (already entity-decoded) string value. children holds this element's child nodes in document order — a mix of Press.HTML.Element and Press.HTML.Text.

Summary

Types

t()

An HTML element node struct.

Types

t()

@type t() :: %Press.HTML.Element{
  attrs: %{required(String.t()) => String.t()},
  children: [t() | Press.HTML.Text.t()],
  tag: String.t()
}

An HTML element node struct.