Documentation ¶
Index ¶
- Constants
- func IsEmptyElement(tag string) bool
- type Attribute
- type Changes
- type DOMNode
- type ParseTree
- type Positions
- type ReconcileParams
- type Reconciler
- func (r *Reconciler) AppendChildNode(rootElement dom.Element)
- func (r *Reconciler) ApplyChange(rootElement dom.Element) error
- func (r *Reconciler) RemoveNode(rootElement dom.Element)
- func (r *Reconciler) RemoveNodeAttribute(rootElement dom.Element)
- func (r *Reconciler) ReplaceNode(rootElement dom.Element)
- func (r *Reconciler) SetNodeAttribute(rootElement dom.Element)
Constants ¶
View Source
const ( ElementNodeType = iota CommentNodeType TextNodeType )
View Source
const ( SetNodeAttributeAction = iota RemoveNodeAttributeAction RemoveNodeAction ReplaceNodeAction AppendChildNodeAction )
Variables ¶
This section is empty.
Functions ¶
func IsEmptyElement ¶
Types ¶
type DOMNode ¶
type DOMNode struct { Positions NodeType int Position []int ParentNode *DOMNode ChildNodes []*DOMNode Contents []byte Name string Value []byte IsSelfClosing bool Attributes []Attribute // contains filtered or unexported fields }
func NewDOMNode ¶
func (*DOMNode) AttributesMap ¶
func (*DOMNode) GetHTMLContents ¶
type ParseTree ¶
type ParseTree struct { ChildNodes []*DOMNode // contains filtered or unexported fields }
func NewParseTree ¶
type ReconcileParams ¶
type ReconcileParams struct { }
type Reconciler ¶
type Reconciler struct { ActionType int ParentNode *DOMNode ChildNode *DOMNode ExistingNode *DOMNode NewNode *DOMNode AttributeName string AttributeValue string }
func (*Reconciler) AppendChildNode ¶
func (r *Reconciler) AppendChildNode(rootElement dom.Element)
func (*Reconciler) ApplyChange ¶
func (r *Reconciler) ApplyChange(rootElement dom.Element) error
func (*Reconciler) RemoveNode ¶
func (r *Reconciler) RemoveNode(rootElement dom.Element)
func (*Reconciler) RemoveNodeAttribute ¶
func (r *Reconciler) RemoveNodeAttribute(rootElement dom.Element)
func (*Reconciler) ReplaceNode ¶
func (r *Reconciler) ReplaceNode(rootElement dom.Element)
func (*Reconciler) SetNodeAttribute ¶
func (r *Reconciler) SetNodeAttribute(rootElement dom.Element)
Click to show internal directories.
Click to hide internal directories.