nakai/node

Types

pub type Doctype {
  Doctype(decl: String)
}

Constructors

  • Doctype(decl: String)
pub type Node {
  Comment(content: String)
  Component(factory: fn() -> Node)
  Element(tag: String, attrs: List(Attr), children: List(Node))
  Fragment(children: List(Node))
  LeafElement(tag: String, attrs: List(Attr))
  None
  Text(content: String)
}

Constructors

  • Comment(content: String)
  • Component(factory: fn() -> Node)
  • Element(tag: String, attrs: List(Attr), children: List(Node))
  • Fragment(children: List(Node))
  • LeafElement(tag: String, attrs: List(Attr))
  • None
  • Text(content: String)

Functions

pub fn comment(content: String) -> Node
pub fn component(decl: fn(a) -> Node, props: a) -> Node
pub fn const_component(decl: fn() -> Node) -> Node
pub fn doctype(decl: String) -> Doctype
pub fn fragment(children: List(Node)) -> Node
pub fn none() -> Node
pub fn text(content: String) -> Node