Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PuerkitoBio/goquery
/ functions
Functions
666 in github.com/PuerkitoBio/goquery
⨍
Functions
666
◇
Types & classes
7
↓ 3 callers
Method
After
After applies the selector from the root document and inserts the matched elements after the elements in the set of matched elements. If one of the m
manipulation.go:16
↓ 3 callers
Method
AfterNodes
AfterNodes inserts the nodes after each element in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:56
↓ 3 callers
Method
AndSelf
AndSelf adds the previous set of elements on the stack to the current set. It returns a new Selection object containing the current Selection combined
expand.go:45
↓ 3 callers
Method
AppendHtml
AppendHtml parses the html and appends it to the set of matched elements.
manipulation.go:95
↓ 3 callers
Method
AppendNodes
AppendNodes appends the specified nodes to each node in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:106
↓ 3 callers
Method
FilterFunction
FilterFunction reduces the set of matched elements to those that pass the function's test. It returns a new Selection object for this subset of elemen
filter.go:32
↓ 3 callers
Method
FilterNodes
FilterNodes reduces the set of matched elements to those that match the specified nodes. It returns a new Selection object for this subset of elements
filter.go:44
↓ 3 callers
Method
HasSelection
HasSelection reduces the set of matched elements to those that have a descendant that matches one of the nodes of the specified Selection object. It r
filter.go:127
↓ 3 callers
Method
Index
Index returns the position of the first element within the Selection object relative to its sibling elements.
array.go:82
↓ 3 callers
Method
IndexOfNode
IndexOfNode returns the position of the specified node within the Selection object, or -1 if not found.
array.go:119
↓ 3 callers
Method
IndexSelector
IndexSelector returns the position of the first element within the Selection object relative to the elements matched by the selector, or -1 if not fou
array.go:98
↓ 3 callers
Method
IsFunction
IsFunction checks the current matched set of elements against a predicate and returns true if at least one of these elements matches.
query.go:24
↓ 3 callers
Method
IsNodes
IsNodes checks the current matched set of elements against the specified nodes and returns true if at least one of these elements matches.
query.go:44
↓ 3 callers
Method
IsSelection
IsSelection checks the current matched set of elements against a Selection object and returns true if at least one of these elements matches.
query.go:35
↓ 3 callers
Method
NextFilteredUntilNodes
NextFilteredUntilNodes is like NextUntilNodes, with the option to filter the results based on a selector string. It returns a new Selection object con
traversal.go:475
↓ 3 callers
Method
NextFilteredUntilSelection
NextFilteredUntilSelection is like NextUntilSelection, with the option to filter the results based on a selector string. It returns a new Selection ob
traversal.go:458
↓ 3 callers
Method
NextUntilSelection
NextUntilSelection gets all following siblings of each element up to but not including the element matched by the Selection. It returns a new Selectio
traversal.go:390
↓ 3 callers
Method
NotFunction
NotFunction removes elements from the Selection that pass the function's test. It returns a new Selection object with the matching elements removed.
filter.go:38
↓ 3 callers
Method
NotNodes
NotNodes removes elements from the Selection that match the specified nodes. It returns a new Selection object with the matching elements removed.
filter.go:50
↓ 3 callers
Method
NotSelection
NotSelection removes elements from the Selection that match a node in the specified Selection object. It returns a new Selection object with the match
filter.go:66
↓ 3 callers
Method
ParentsFilteredUntilNodes
ParentsFilteredUntilNodes is like ParentsUntilNodes, with the option to filter the results based on a selector string. It returns a new Selection obje
traversal.go:260
↓ 3 callers
Method
ParentsFilteredUntilSelection
ParentsFilteredUntilSelection is like ParentsUntilSelection, with the option to filter the results based on a selector string. It returns a new Select
traversal.go:243
↓ 3 callers
Method
ParentsUntilSelection
ParentsUntilSelection gets the ancestors of each element in the Selection, up to but not including the elements in the specified Selection. It returns
traversal.go:213
↓ 3 callers
Method
PrependSelection
PrependSelection prepends the elements in the selection to each element in the set of matched elements. This follows the same rules as Selection.Appe
manipulation.go:207
↓ 3 callers
Method
PrevFilteredUntilNodes
PrevFilteredUntilNodes is like PrevUntilNodes, with the option to filter the results based on a selector string. It returns a new Selection object con
traversal.go:524
↓ 3 callers
Method
PrevFilteredUntilSelection
PrevFilteredUntilSelection is like PrevUntilSelection, with the option to filter the results based on a selector string. It returns a new Selection ob
traversal.go:507
↓ 3 callers
Method
PrevUntilSelection
PrevUntilSelection gets all preceding siblings of each element up to but not including the element matched by the Selection. It returns a new Selectio
traversal.go:424
↓ 3 callers
Method
Size
Size is an alias for Length.
property.go:76
↓ 3 callers
Method
WrapInner
WrapInner wraps an HTML structure, matched by the given selector, around the content of element in the set of matched elements. The matched child is c
manipulation.go:499
↓ 3 callers
Function
cachedParseHtmlWithContext
cachedParseHtmlWithContext returns parseHtmlWithContext(htmlStr, context), reusing a prior result when context's nodeName has already been seen. Calle
manipulation.go:672
↓ 3 callers
Function
getClassesAndAttr
Get and normalize the "class" attribute from the node.
property.go:222
↓ 3 callers
Function
getClassesSlice
(classes string)
property.go:244
↓ 3 callers
Function
getParentNodes
Internal implementation of parent nodes that return a raw slice of Nodes.
traversal.go:689
↓ 3 callers
Function
newEmptySelection
Helper constructor to create an empty selection
type.go:106
↓ 3 callers
Function
parseHtmlWithContext
(h string, context *html.Node)
manipulation.go:566
↓ 3 callers
Function
removeAttr
(n *html.Node, attrName string)
property.go:248
↓ 3 callers
Function
setClasses
(n *html.Node, attr *html.Attribute, classes string)
property.go:258
↓ 3 callers
Function
winnow
Filter based on the matcher, and the indicator to keep (Filter) or to get rid of (Not) the matching elements.
filter.go:145
↓ 3 callers
Method
wrapNodes
(ns ...*html.Node)
manipulation.go:406
↓ 2 callers
Method
AddBackFiltered
AddBackFiltered reduces the previous set of elements on the stack to those that match the selector string, and adds them to the current set. It return
expand.go:60
↓ 2 callers
Method
AfterHtml
AfterHtml parses the html and inserts it after the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:42
↓ 2 callers
Method
Append
Append appends the elements specified by the selector to the end of each element in the set of matched elements, following those rules: 1) The select
manipulation.go:74
↓ 2 callers
Method
Before
Before inserts the matched elements before each element in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:115
↓ 2 callers
Method
BeforeHtml
BeforeHtml parses the html and inserts it before the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:137
↓ 2 callers
Method
BeforeNodes
BeforeNodes inserts the nodes before each element in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:150
↓ 2 callers
Method
Clone
Clone creates a deep copy of the set of matched nodes. The new nodes will not be attached to the document.
manipulation.go:160
↓ 2 callers
Function
CloneDocument
CloneDocument creates a deep-clone of a document.
type.go:84
↓ 2 callers
Method
EachWithBreak
EachWithBreak iterates over a Selection object, executing a function for each matched element. It is identical to Each except that it is possible to b
iteration.go:33
↓ 2 callers
Method
FindNodes
FindNodes gets the descendants of each element in the current Selection, filtered by some nodes. It returns a new Selection object containing these ma
traversal.go:53
↓ 2 callers
Method
FindSelection
FindSelection gets the descendants of each element in the current Selection, filtered by a Selection. It returns a new Selection object containing the
traversal.go:43
↓ 2 callers
Method
IndexOfSelection
IndexOfSelection returns the position of the first node in the specified Selection object within this Selection object, or -1 if not found.
array.go:125
↓ 2 callers
Method
Intersection
Intersection is an alias for FilterSelection.
filter.go:74
↓ 2 callers
Function
Map
Map is the generic version of Selection.Map, allowing any type to be returned.
iteration.go:53
↓ 2 callers
Method
Map
Map passes each element in the current matched set through a function, producing a slice of string holding the returned values. The function f is call
iteration.go:47
↓ 2 callers
Method
MatchFirst
MatchFirst returns the first node that matches, or nil if none does. It uses the underlying Matcher's MatchFirst method if it provides one (cascadia-
type.go:182
↓ 2 callers
Function
NewDocumentFromNode
NewDocumentFromNode is a Document constructor that takes a root html Node as argument.
type.go:26
↓ 2 callers
Function
NewDocumentFromResponse
NewDocumentFromResponse is another Document constructor that takes an http response as argument. It loads the specified response's document, parses it
type.go:64
↓ 2 callers
Function
NodeName
NodeName returns the node name of the first element in the selection. It tries to behave in a similar way as the DOM's nodeName property (https://deve
utilities.go:35
↓ 2 callers
Method
NotMatcher
NotMatcher removes elements from the Selection that match the given matcher. It returns a new Selection object with the matching elements removed.
filter.go:26
↓ 2 callers
Function
OuterHtml
OuterHtml returns the outer HTML rendering of the first item in the selection - that is, the HTML including the first element's tag and attributes. U
utilities.go:144
↓ 2 callers
Method
Prepend
Prepend prepends the elements specified by the selector to each element in the set of matched elements, following the same rules as Append.
manipulation.go:191
↓ 2 callers
Method
PrependHtml
PrependHtml parses the html and prepends it to the set of matched elements.
manipulation.go:212
↓ 2 callers
Method
PrependNodes
PrependNodes prepends the specified nodes to each node in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:225
↓ 2 callers
Method
ReplaceWithHtml
ReplaceWithHtml replaces each element in the set of matched elements with the parsed HTML. It returns the removed elements. This follows the same rul
manipulation.go:294
↓ 2 callers
Method
ReplaceWithNodes
ReplaceWithNodes replaces each element in the set of matched elements with the given nodes. It returns the removed elements. This follows the same ru
manipulation.go:311
↓ 2 callers
Method
ReplaceWithSelection
ReplaceWithSelection replaces each element in the set of matched elements with the nodes from the given Selection. It returns the removed elements. T
manipulation.go:285
↓ 2 callers
Method
SetAttr
SetAttr sets the given attribute on each element in the set of matched elements.
property.go:41
↓ 2 callers
Function
Single
Single compiles a selector string to a Matcher that stops after the first match is found. By default, Selection.Find and other functions that accept
type.go:147
↓ 2 callers
Function
SingleMatcher
SingleMatcher returns a Matcher matches the same nodes as m, but that stops after the first match is found. See the documentation of function Single
type.go:155
↓ 2 callers
Method
Wrap
Wrap wraps each element in the set of matched elements inside the first element matched by the given selector. The matched child is cloned before bein
manipulation.go:358
↓ 2 callers
Function
appendWithoutDuplicates
Appends the new nodes to the target slice, making sure no duplicate is added. There is no check to the original state of the target slice, so it may s
utilities.go:197
↓ 2 callers
Function
getChildrenWithSiblingType
Gets the children of the specified parent, based on the requested sibling type, skipping a specified node if required.
traversal.go:611
↓ 2 callers
Function
nodeContains
Checks if the contained node is within the container node.
utilities.go:164
↓ 2 callers
Function
nodeName
nodeName returns the node name of the given html node. See NodeName for additional details on behaviour.
utilities.go:44
↓ 2 callers
Function
sliceContains
Loop through all container nodes to search for the target node.
utilities.go:153
↓ 2 callers
Function
winnowFunction
Filter based on a function test, and the indicator to keep (Filter) or to get rid of (Not) the matching elements.
filter.go:188
↓ 1 callers
Method
AddMatcher
AddMatcher adds the matcher's matching nodes to those in the current selection and returns a new Selection object. The matcher is run in the context o
expand.go:17
↓ 1 callers
Method
AfterMatcher
AfterMatcher applies the matcher from the root document and inserts the matched elements after the elements in the set of matched elements. If one of
manipulation.go:27
↓ 1 callers
Method
AfterSelection
AfterSelection inserts the elements in the selection after each element in the set of matched elements. This follows the same rules as Selection.Appe
manipulation.go:35
↓ 1 callers
Method
AppendMatcher
AppendMatcher appends the elements specified by the matcher to the end of each element in the set of matched elements. This follows the same rules as
manipulation.go:82
↓ 1 callers
Method
AttrOr
AttrOr works like Attr but returns default value if attribute is not present.
property.go:24
↓ 1 callers
Method
BeforeMatcher
BeforeMatcher inserts the matched elements before each element in the set of matched elements. This follows the same rules as Selection.Append.
manipulation.go:122
↓ 1 callers
Method
BeforeSelection
BeforeSelection inserts the elements in the selection before each element in the set of matched elements. This follows the same rules as Selection.Ap
manipulation.go:130
↓ 1 callers
Method
ChildrenMatcher
ChildrenMatcher gets the child elements of each element in the Selection, filtered by the specified matcher. It returns a new Selection object contain
traversal.go:105
↓ 1 callers
Method
ClosestMatcher
ClosestMatcher gets the first element that matches the matcher by testing the element itself and traversing up through its ancestors in the DOM tree.
traversal.go:136
↓ 1 callers
Function
Doc3
()
type_test.go:39
↓ 1 callers
Function
Doc3Clone
()
type_test.go:46
↓ 1 callers
Method
Empty
Empty removes all children nodes from the set of matched elements. It returns the children nodes in a new Selection.
manipulation.go:168
↓ 1 callers
Method
HasMatcher
HasMatcher reduces the set of matched elements to those that have a descendant that matches the matcher. It returns a new Selection object with the ma
filter.go:88
↓ 1 callers
Method
IsMatcher
IsMatcher checks the current matched set of elements against a matcher and returns true if at least one of these elements matches.
query.go:13
↓ 1 callers
Method
NextMatcher
NextMatcher gets the immediately following sibling of each element in the Selection filtered by a matcher. It returns a new Selection object containin
traversal.go:307
↓ 1 callers
Method
NextMatcherUntilNodes
NextMatcherUntilNodes is like NextUntilNodes, with the option to filter the results based on a matcher. It returns a new Selection object containing t
traversal.go:483
↓ 1 callers
Method
NextMatcherUntilSelection
NextMatcherUntilSelection is like NextUntilSelection, with the option to filter the results based on a matcher. It returns a new Selection object cont
traversal.go:465
↓ 1 callers
Method
ParentsMatcher
ParentsMatcher gets the ancestors of each element in the current Selection. It returns a new Selection object with the matched elements.
traversal.go:192
↓ 1 callers
Method
ParentsMatcherUntilNodes
ParentsMatcherUntilNodes is like ParentsUntilNodes, with the option to filter the results based on a matcher. It returns a new Selection object contai
traversal.go:267
↓ 1 callers
Method
ParentsMatcherUntilSelection
ParentsMatcherUntilSelection is like ParentsUntilSelection, with the option to filter the results based on a matcher. It returns a new Selection objec
traversal.go:250
↓ 1 callers
Method
PrependMatcher
PrependMatcher prepends the elements specified by the matcher to each element in the set of matched elements. This follows the same rules as Selectio
manipulation.go:199
↓ 1 callers
Method
PrevMatcher
PrevMatcher gets the immediately preceding sibling of each element in the Selection filtered by a matcher. It returns a new Selection object containin
traversal.go:347
↓ 1 callers
Method
PrevMatcherUntilNodes
PrevMatcherUntilNodes is like PrevUntilNodes, with the option to filter the results based on a matcher. It returns a new Selection object containing t
traversal.go:532
↓ 1 callers
Method
PrevMatcherUntilSelection
PrevMatcherUntilSelection is like PrevUntilSelection, with the option to filter the results based on a matcher. It returns a new Selection object cont
traversal.go:514
← previous
next →
101–200 of 666, ranked by callers