Documentation
¶
Overview ¶
Package htmlx holds the small x/net/html node operations shared by the compiler, the document checks and the release audits.
Index ¶
- func Attr(n *html.Node, key string) string
- func DelAttr(n *html.Node, keys ...string)
- func Dormant(n *html.Node) bool
- func Element(name, text string) *html.Node
- func HasAttr(n *html.Node, key string) bool
- func HasToken(n *html.Node, key, token string) bool
- func Move(parent, n *html.Node)
- func RawText(n *html.Node) string
- func Rel(n *html.Node, token string) bool
- func SetAttr(n *html.Node, key, value string)
- func SetText(n *html.Node, value string)
- func Text(n *html.Node) string
- func Walk(n *html.Node, visit func(*html.Node))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dormant ¶
Dormant reports whether n sits inside an HTML <template>, whose content does not render or execute until a script instantiates it.
func HasToken ¶
HasToken reports whether a space-separated attribute (such as rel) contains token, case-insensitively.
func RawText ¶
RawText concatenates the direct children's data. It is meant for raw-text elements such as script and style, whose content is a single text node.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.