Documentation ¶
Index ¶
- func AddClass(n *html.Node, classname string)
- func Attr(n *html.Node, a ...string) string
- func Get(n *html.Node, key string) string
- func GetNS(n *html.Node, namespace, key string) string
- func GetNode(n *html.Node, key string) (html.Attribute, bool)
- func GetNodeNS(n *html.Node, namespace, key string) (html.Attribute, bool)
- func Has(n *html.Node, key string) bool
- func HasClass(n *html.Node, classname string) bool
- func HasNS(n *html.Node, namespace, key string) bool
- func HasNode(n *html.Node, a html.Attribute) bool
- func HasValue(n *html.Node, key, value string) bool
- func IndexOf(n *html.Node, key string) int
- func IndexOfNS(n *html.Node, namespace, key string) int
- func IndexOfNode(n *html.Node, a html.Attribute) int
- func Remove(n *html.Node, key string)
- func RemoveClass(n *html.Node, classname string)
- func RemoveNS(n *html.Node, namespace, key string)
- func RemoveNode(n *html.Node, a html.Attribute)
- func Set(n *html.Node, key, value string)
- func SetNS(n *html.Node, namespace, key, value string)
- func SetNode(n *html.Node, a html.Attribute)
- func SetNodeNS(n *html.Node, a html.Attribute)
- func ToggleClass(n *html.Node, classname string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddClass ¶
AddClass add given classname to vlaue of class attribute. sets given classname as value of class attribute if has not class attribute
func Attr ¶
Attr if given a 1 argument: treat as the "Key" and returns it value. same as Get if given a 2 argument: treat as the "Key" and "Value",
sets these as the attribute. same as Set
if given a 3 argument: treat as the "Namespace", "Key" and "Value",
sets these as the attribute. same as SetNS
func HasValue ¶
HasValue returns true if it element has value of attribute. first matching key of attribute without considering duplicates
func RemoveClass ¶
RemoveClass removes given classname from the value of class attribute
func ToggleClass ¶
ToggleClass adds given classname if has not class name or removes it classname if already have class name
Types ¶
This section is empty.