You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2026. It is now read-only.
//GetAttribute returns the specified attribute value form the node. If the specified attribute doesn't exists GetAttribute returns a empty string and false.
//GetText returns text on the node. This does not returns text on it's child nodes. If you also wants child nodes text use GetInnerText method on the node.
133
-
func (node*Node) GetText() string{
133
+
//GetText returns text on the node. This does not returns text on it's child nodes. If you also wants child nodes text use GetInnerText method on the node.
134
+
func (node*Node) GetText() string{
134
135
node.rwMutex.Lock()
135
136
defernode.rwMutex.Unlock()
136
137
137
138
returnnode.text
138
139
}
139
140
140
-
//SetText add text to the node.
141
-
func (node*Node) SetText(textstring){
141
+
//SetText add text to the node.
142
+
func (node*Node) SetText(textstring){
142
143
node.rwMutex.Lock()
143
144
defernode.rwMutex.Unlock()
144
145
145
146
node.text=text
146
147
}
147
148
148
-
//The AppendChild() method of the Node adds a node to the end of the list of children of a specified parent node.
149
+
//The AppendChild() method of the Node adds a node to the end of the list of children of a specified parent node.
Copy file name to clipboardExpand all lines: traverser.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ const (
54
54
ContinueWalkthroughTraverseCondition=false
55
55
)
56
56
57
-
//TODO: use a linked stack
58
-
//Walkthrough traverse the node tree from the current node to the end of the node tree by visiting every node. If callback returned StopWalkthrough walkthrough function will stop else if it returned ContinueWalkthrough it continues walkthrough until every node is visited.
57
+
//Walkthrough traverse the node tree from the current node to the end of the node tree by visiting every node. If callback returned StopWalkthrough walkthrough function will stop else if it returned ContinueWalkthrough it advanced to the next node.
58
+
//Walkthrough calls callback at every node and pass that node. Walkthrough traverse the node tree similar to DFS without visiting visited nodes iteratively.
0 commit comments