Documentation ¶
Index ¶
- func NewNode(node *html.Node) spec.Node
- type Document
- func (d *Document) CloneNode(deep bool) spec.Node
- func (d *Document) Contains(other spec.Node) bool
- func (*Document) CreateElement(localName string) spec.Element
- func (*Document) CreateElementIs(localName, is string) spec.Element
- func (*Document) CreateTextNode(text string) spec.Text
- func (d *Document) GetElementsByClassName(name string) spec.ElementCollection
- func (d *Document) GetElementsByTagName(name string) spec.ElementCollection
- func (d *Document) IsSameNode(other spec.Node) bool
- func (d *Document) NodeType() spec.NodeType
- func (d *Document) QuerySelector(query string) spec.Element
- func (d *Document) QuerySelectorAll(query string) spec.NodeList[spec.Element]
- func (d *Document) TextContent() string
- type DocumentFragment
- func (d *DocumentFragment) Append(nodes ...spec.ChildNode)
- func (d *DocumentFragment) ChildElementCount() int
- func (d *DocumentFragment) Children() spec.ElementCollection
- func (d *DocumentFragment) CloneNode(deep bool) spec.Node
- func (d *DocumentFragment) FirstElementChild() spec.Element
- func (d *DocumentFragment) IsSameNode(other spec.Node) bool
- func (d *DocumentFragment) LastElementChild() spec.Element
- func (d *DocumentFragment) NodeType() spec.NodeType
- func (d *DocumentFragment) Prepend(nodes ...spec.ChildNode)
- func (d *DocumentFragment) QuerySelector(query string) spec.Element
- func (d *DocumentFragment) QuerySelectorAll(query string) spec.NodeList[spec.Element]
- func (d *DocumentFragment) ReplaceChildren(nodes ...spec.ChildNode)
- func (d *DocumentFragment) TextContent() string
- type Element
- func (e *Element) Append(nodes ...spec.Node)
- func (e *Element) AppendChild(node spec.ChildNode) spec.ChildNode
- func (e *Element) ChildElementCount() int
- func (e *Element) ChildNodes() spec.NodeList[spec.Node]
- func (e *Element) Children() spec.ElementCollection
- func (e *Element) ClassName() string
- func (e *Element) CloneNode(deep bool) spec.Node
- func (e *Element) Closest(selector string) spec.Element
- func (e *Element) Contains(other spec.Node) bool
- func (e *Element) FirstChild() spec.ChildNode
- func (e *Element) FirstElementChild() spec.Element
- func (e *Element) GetAttribute(name string) string
- func (e *Element) GetElementsByClassName(name string) spec.ElementCollection
- func (e *Element) GetElementsByTagName(name string) spec.ElementCollection
- func (e *Element) HasAttribute(name string) bool
- func (e *Element) HasChildNodes() bool
- func (e *Element) ID() string
- func (e *Element) InnerHTML() string
- func (e *Element) InsertBefore(node, child spec.ChildNode) spec.ChildNode
- func (e *Element) IsConnected() bool
- func (e *Element) IsSameNode(other spec.Node) bool
- func (e *Element) LastChild() spec.ChildNode
- func (e *Element) LastElementChild() spec.Element
- func (e *Element) Length() int
- func (e *Element) Matches(selector string) bool
- func (e *Element) NextSibling() spec.ChildNode
- func (e *Element) NodeType() spec.NodeType
- func (e *Element) OuterHTML() string
- func (e *Element) OwnerDocument() spec.Document
- func (e *Element) ParentElement() spec.Element
- func (e *Element) ParentNode() spec.Node
- func (e *Element) Prepend(nodes ...spec.Node)
- func (e *Element) PreviousSibling() spec.ChildNode
- func (e *Element) QuerySelector(query string) spec.Element
- func (e *Element) QuerySelectorAll(query string) spec.NodeList[spec.Element]
- func (e *Element) RemoveAttribute(name string)
- func (e *Element) RemoveChild(node spec.ChildNode) spec.ChildNode
- func (e *Element) ReplaceChild(node, child spec.ChildNode) spec.ChildNode
- func (e *Element) ReplaceChildren(nodes ...spec.Node)
- func (e *Element) SetAttribute(name, value string)
- func (e *Element) SetInnerHTML(s string)
- func (e *Element) SetOuterHTML(s string)
- func (e *Element) TagName() string
- func (e *Element) TextContent() string
- func (e *Element) ToggleAttribute(name string) bool
- type Text
- func (t *Text) CloneNode(_ bool) spec.Node
- func (t *Text) Data() string
- func (t *Text) IsConnected() bool
- func (t *Text) IsSameNode(other spec.Node) bool
- func (t *Text) Length() int
- func (t *Text) NextSibling() spec.ChildNode
- func (t *Text) NodeType() spec.NodeType
- func (t *Text) OwnerDocument() spec.Document
- func (t *Text) ParentElement() spec.Element
- func (t *Text) ParentNode() spec.Node
- func (t *Text) PreviousSibling() spec.ChildNode
- func (t *Text) SetData(d string)
- func (t *Text) TextContent() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) CreateElementIs ¶
func (*Document) GetElementsByClassName ¶
func (d *Document) GetElementsByClassName(name string) spec.ElementCollection
func (*Document) GetElementsByTagName ¶
func (d *Document) GetElementsByTagName(name string) spec.ElementCollection
func (*Document) QuerySelectorAll ¶
func (*Document) TextContent ¶
TextContent returns an empty string. The spec says it should return null https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
type DocumentFragment ¶
type DocumentFragment struct {
// contains filtered or unexported fields
}
func NewDocumentFragment ¶
func NewDocumentFragment(nodes []*html.Node) *DocumentFragment
func (*DocumentFragment) Append ¶
func (d *DocumentFragment) Append(nodes ...spec.ChildNode)
func (*DocumentFragment) ChildElementCount ¶
func (d *DocumentFragment) ChildElementCount() int
func (*DocumentFragment) Children ¶
func (d *DocumentFragment) Children() spec.ElementCollection
func (*DocumentFragment) FirstElementChild ¶
func (d *DocumentFragment) FirstElementChild() spec.Element
func (*DocumentFragment) IsSameNode ¶
func (d *DocumentFragment) IsSameNode(other spec.Node) bool
func (*DocumentFragment) LastElementChild ¶
func (d *DocumentFragment) LastElementChild() spec.Element
func (*DocumentFragment) NodeType ¶
func (d *DocumentFragment) NodeType() spec.NodeType
func (*DocumentFragment) Prepend ¶
func (d *DocumentFragment) Prepend(nodes ...spec.ChildNode)
func (*DocumentFragment) QuerySelector ¶
func (d *DocumentFragment) QuerySelector(query string) spec.Element
func (*DocumentFragment) QuerySelectorAll ¶
func (*DocumentFragment) ReplaceChildren ¶
func (d *DocumentFragment) ReplaceChildren(nodes ...spec.ChildNode)
func (*DocumentFragment) TextContent ¶
func (d *DocumentFragment) TextContent() string
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
func (*Element) ChildElementCount ¶
func (*Element) Children ¶
func (e *Element) Children() spec.ElementCollection
func (*Element) FirstChild ¶
func (*Element) FirstElementChild ¶
func (*Element) GetAttribute ¶
func (*Element) GetElementsByClassName ¶
func (e *Element) GetElementsByClassName(name string) spec.ElementCollection
func (*Element) GetElementsByTagName ¶
func (e *Element) GetElementsByTagName(name string) spec.ElementCollection
func (*Element) HasAttribute ¶
func (*Element) HasChildNodes ¶
func (*Element) InsertBefore ¶
func (*Element) IsConnected ¶
func (*Element) LastElementChild ¶
func (*Element) NextSibling ¶
func (*Element) OwnerDocument ¶
func (*Element) ParentElement ¶
func (*Element) ParentNode ¶
func (*Element) PreviousSibling ¶
func (*Element) QuerySelectorAll ¶
func (*Element) RemoveAttribute ¶
func (*Element) ReplaceChild ¶
func (*Element) ReplaceChildren ¶
func (*Element) SetAttribute ¶
func (*Element) SetInnerHTML ¶
func (*Element) SetOuterHTML ¶
func (*Element) TextContent ¶
func (*Element) ToggleAttribute ¶
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func (*Text) IsConnected ¶
func (*Text) NextSibling ¶
func (*Text) OwnerDocument ¶
func (*Text) ParentElement ¶
func (*Text) ParentNode ¶
func (*Text) PreviousSibling ¶
func (*Text) TextContent ¶
Click to show internal directories.
Click to hide internal directories.