Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crufter/goquery
/ functions
Functions
196 in github.com/crufter/goquery
⨍
Functions
196
◇
Types & classes
22
↓ 52 callers
Method
addElement
addElement calls addChild with an element node.
exp/html/parse.go:280
↓ 32 callers
Method
popUntil
popUntil pops the stack of open elements at the highest element whose tag is in matchTags, provided there is no higher element in the scope's stop tag
exp/html/parse.go:92
↓ 31 callers
Method
pop
pop pops the stack. It will panic if s is empty.
exp/html/node.go:98
↓ 26 callers
Method
WriteString
(string)
exp/html/render.go:18
↓ 26 callers
Method
top
()
exp/html/parse.go:47
↓ 22 callers
Method
readByte
readByte returns the next byte from the input stream, doing a buffered read from z.r into z.buf if necessary. z.buf[z.raw.start:z.raw.end] remains a c
exp/html/token.go:170
↓ 18 callers
Function
inBodyIM
Section 12.2.5.4.7.
exp/html/parse.go:691
↓ 16 callers
Method
reconstructActiveFormattingElements
Section 12.2.3.3.
exp/html/parse.go:345
↓ 15 callers
Method
parseImpliedToken
parseImpliedToken parses a token as though it had appeared in the parser's input.
exp/html/parse.go:1928
↓ 14 callers
Method
Add
Add adds a node as a child of n. It will panic if the child's parent is not nil.
exp/html/node.go:44
↓ 13 callers
Method
WriteByte
(byte)
exp/html/render.go:17
↓ 13 callers
Method
addChild
addChild adds a child node n to the top element, and pushes n onto the stack of open elements if it is an element node.
exp/html/parse.go:207
↓ 12 callers
Method
index
index returns the index of the top-most occurrence of n in the stack, or -1 if n is not present.
exp/html/node.go:115
↓ 11 callers
Method
Find
Get the descendants of each element in the current set of matched elements, filtered by a selector, GoQuery object, or element.
goquery.go:453
↓ 11 callers
Method
addText
addText adds text to the preceding node if it is a text node, or else it calls addChild with a new text node.
exp/html/parse.go:266
↓ 11 callers
Method
elementInScope
elementInScope is like popUntil, except that it doesn't modify the stack of open elements.
exp/html/parse.go:149
↓ 9 callers
Method
remove
remove removes a node from the stack. It is a no-op if n is not present.
exp/html/node.go:132
↓ 8 callers
Method
String
String returns a string representation of the Token.
exp/html/token.go:94
↓ 8 callers
Method
acknowledgeSelfClosingTag
Section 12.2.4.
exp/html/parse.go:384
↓ 7 callers
Method
Err
Err returns the error associated with the most recent ErrorToken token. This is typically io.EOF, meaning the end of tokenization.
exp/html/token.go:158
↓ 7 callers
Method
clearActiveFormattingElements
Section 12.2.3.3.
exp/html/parse.go:335
↓ 7 callers
Function
inHeadIM
Section 12.2.5.4.4.
exp/html/parse.go:554
↓ 7 callers
Function
satisfiesSel
This is where we decide if a Node satisfies a given selector (for example: "div.nice" or "#whatever.yoyoyo")
goquery.go:100
↓ 6 callers
Method
clearStackToContext
clearStackToContext pops elements off the stack of open elements until a scope-defined element is found.
exp/html/parse.go:155
↓ 6 callers
Function
parseSelector
(str string)
goquery.go:200
↓ 6 callers
Method
startTagIn
startTagIn returns whether the start tag in z.buf[z.data.start:z.data.end] case-insensitively matches any element of ss.
exp/html/token.go:388
↓ 5 callers
Function
NewTokenizer
NewTokenizer returns a new HTML Tokenizer for the given Reader. The input is assumed to be UTF-8 encoded.
exp/html/token.go:809
↓ 5 callers
Method
Next
Next scans the next token and returns its type.
exp/html/token.go:585
↓ 5 callers
Method
TagName
TagName returns the lower-cased name of a tag token (the `img` out of `<IMG SRC="foo">`) and whether the tag has attributes. The contents of the retur
exp/html/token.go:753
↓ 5 callers
Method
setOriginalIM
setOriginalIM sets the insertion mode to return to after completing a text or inTableText insertion mode. Section 12.2.3.1, "using the rules for".
exp/html/parse.go:397
↓ 5 callers
Method
skipWhiteSpace
skipWhiteSpace skips past any white space.
exp/html/token.go:216
↓ 4 callers
Function
Lookup
Lookup returns the atom whose name is s. It returns zero if there is no such atom.
exp/html/atom/atom.go:41
↓ 4 callers
Method
Print
()
goquery.go:62
↓ 4 callers
Function
adjustAttributeNames
(aa []Attribute, nameMap map[string]string)
exp/html/foreign.go:11
↓ 4 callers
Function
escape
(w writer, s string)
exp/html/escape.go:197
↓ 4 callers
Function
isSpecialElement
(element *Node)
exp/html/const.go:92
↓ 4 callers
Method
readUntilCloseAngle
readUntilCloseAngle reads until the next ">".
exp/html/token.go:330
↓ 4 callers
Method
resetInsertionMode
Section 12.2.3.1, "reset the insertion mode".
exp/html/parse.go:405
↓ 3 callers
Function
Parse
Parse returns the parse tree for the HTML from the given Reader. The input is assumed to be UTF-8 encoded.
exp/html/parse.go:1978
↓ 3 callers
Method
Remove
Remove removes a node as a child of n. It will panic if the child's parent is not n.
exp/html/node.go:54
↓ 3 callers
Method
Text
Text returns the unescaped text of a text, comment or doctype token. The contents of the returned slice may change on the next call to Next.
exp/html/token.go:735
↓ 3 callers
Method
Token
Token returns the next Token. The result's Data and Attr values remain valid after subsequent Next calls.
exp/html/token.go:785
↓ 3 callers
Method
addFormattingElement
Section 12.2.3.3.
exp/html/parse.go:289
↓ 3 callers
Function
benchmarkTokenizer
(b *testing.B, level int)
exp/html/token_test.go:628
↓ 3 callers
Method
clone
clone returns a new node with the same type, data and attributes. The clone has no parent and no children.
exp/html/node.go:84
↓ 3 callers
Function
convertNewlines
convertNewlines converts "\r" and "\r\n" in s to "\n". The conversion happens in place, but the resulting slice may be shorter.
exp/html/token.go:703
↓ 3 callers
Function
filterByFunc
Reduce the set of matched elements to those that /*match the selector or*/ pass the function's test.
goquery.go:341
↓ 3 callers
Method
inBodyEndTagFormatting
(tag string)
exp/html/parse.go:1019
↓ 3 callers
Method
indexOfElementInScope
indexOfElementInScope returns the index in p.oe of the highest element whose tag is in matchTags that is in scope. If no matching element is in scope,
exp/html/parse.go:103
↓ 3 callers
Function
lhash
lhash returns a uint64 whose high 32 bits are len(s) and whose low 32 bits are hash(s).
exp/html/atom/gen.go:30
↓ 3 callers
Method
tagString
tagString returns a string representation of a tag Token's Data and Attr.
exp/html/token.go:78
↓ 3 callers
Function
unescape
unescape unescapes b's entities in-place, so that "a<b" becomes "a<b".
exp/html/escape.go:166
↓ 3 callers
Function
writeQuoted
writeQuoted writes s to w surrounded by quotes. Normally it will use double quotes, but if s contains a double quote, it will use single quotes. It is
exp/html/render.go:241
↓ 2 callers
Function
EscapeString
EscapeString escapes special characters like "<" to become "<". It escapes only five such characters: <, >, &, ' and ". UnescapeString(EscapeString
exp/html/escape.go:236
↓ 2 callers
Function
Parse
Parse a stream of html.
goquery.go:236
↓ 2 callers
Function
Render
Render renders the parse tree n to the given writer. Rendering is done on a 'best effort' basis: calling Parse on the output of Render will always re
exp/html/render.go:45
↓ 2 callers
Method
TagAttr
TagAttr returns the lower-cased key and unescaped value of the next unparsed attribute for the current tag token and whether there are more attributes
exp/html/token.go:769
↓ 2 callers
Function
UnescapeString
UnescapeString unescapes entities like "<" to become "<". It unescapes a larger range of entities than EscapeString escapes. For example, "á
exp/html/escape.go:250
↓ 2 callers
Function
_html
html and htmlAll could be one func but heck I cba now.
goquery.go:257
↓ 2 callers
Function
adjustForeignAttributes
(aa []Attribute)
exp/html/foreign.go:19
↓ 2 callers
Function
copyAttributes
copyAttributes copies attributes of src not found on dst to dst.
exp/html/parse.go:674
↓ 2 callers
Function
dump
(n *Node)
exp/html/parse_test.go:187
↓ 2 callers
Function
dumpIndent
(w io.Writer, level int)
exp/html/parse_test.go:103
↓ 2 callers
Function
filterBySelector
Reduce the set of matched elements to those that match the selector /*or pass the function's test*/.
goquery.go:356
↓ 2 callers
Function
findRecur
(ns *Nodes, selec selector)
goquery.go:129
↓ 2 callers
Method
fosterParent
fosterParent adds a child node according to the foster parenting rules. Section 12.2.5.3, "foster parenting".
exp/html/parse.go:221
↓ 2 callers
Method
generateImpliedEndTags
generateImpliedEndTags pops nodes off the stack of open elements as long as the top node has a tag name of dd, dt, li, option, optgroup, p, rp, or rt.
exp/html/parse.go:183
↓ 2 callers
Function
getAttr
(ns Nodes, key string)
goquery.go:288
↓ 2 callers
Function
getAttrs
(ns Nodes, key string)
goquery.go:300
↓ 2 callers
Function
hash
The hash function must be the same as the one used in atom.go
exp/html/atom/gen.go:21
↓ 2 callers
Function
htmlAll
(ns Nodes, outer bool)
goquery.go:272
↓ 2 callers
Function
htmlIntegrationPoint
(n *Node)
exp/html/foreign.go:34
↓ 2 callers
Method
inBodyEndTagOther
inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM.
exp/html/parse.go:1144
↓ 2 callers
Function
inTableIM
Section 12.2.5.4.9.
exp/html/parse.go:1186
↓ 2 callers
Method
insert
insert inserts a node at the given index.
exp/html/node.go:125
↓ 2 callers
Function
lower
lower lower-cases the A-Z bytes in b in-place, so that "aBc" becomes "abc".
exp/html/escape.go:186
↓ 2 callers
Function
mapFromSplit
(a string)
goquery.go:90
↓ 2 callers
Function
mathMLTextIntegrationPoint
(n *Node)
exp/html/foreign.go:59
↓ 2 callers
Method
parse
()
exp/html/parse.go:1963
↓ 2 callers
Method
parseCurrentToken
parseCurrentToken runs the current token through the parsing routines until it is consumed.
exp/html/parse.go:1942
↓ 2 callers
Method
readTagName
readTagName sets z.data to the "div" in "<div k=v>". The reader (z.raw.end) is positioned such that the first byte of the tag name (the "d" in "<div")
exp/html/token.go:480
↓ 2 callers
Function
render
(w writer, n *Node)
exp/html/render.go:60
↓ 2 callers
Function
setAttrs
(ns Nodes, key, val string)
goquery.go:313
↓ 2 callers
Function
unescapeEntity
unescapeEntity reads an entity like "<" from b[src:] and writes the corresponding "<" to b[dst:], returning the incremented dst and src cursors. Pr
exp/html/escape.go:57
↓ 1 callers
Method
Attrs
Not in jQuery. Gets the value of an attribute for every element in a set.
goquery.go:407
↓ 1 callers
Method
Filter
Reduce the set of matched elements to those that match the selector or pass the function's test.
goquery.go:435
↓ 1 callers
Method
Fprint
(w io.Writer)
goquery.go:56
↓ 1 callers
Method
HasClass
Determine whether any of the matched elements are assigned the given class.
goquery.go:500
↓ 1 callers
Method
Html
Get the HTML contents of the first element in the set of matched elements.
goquery.go:515
↓ 1 callers
Method
HtmlAll
Not in jQuery. Get the HTML contents of all elements in the set of matched elements.
goquery.go:521
↓ 1 callers
Function
ParseFragment
ParseFragment parses a fragment of HTML and returns the nodes that were found. If the fragment is the InnerHTML for an existing element, pass that ele
exp/html/parse.go:1998
↓ 1 callers
Method
Raw
Raw returns the unmodified text of the current token. Calling Next, Token, Text, TagName or TagAttr may change the contents of the returned slice.
exp/html/token.go:697
↓ 1 callers
Method
String
()
exp/html/parse_test.go:216
↓ 1 callers
Method
String
String returns the atom's name.
exp/html/atom/atom.go:32
↓ 1 callers
Method
Val
Get the current value of the first element in the set of matched elements. or Set the value of each element in the set of matched elements.
goquery.go:660
↓ 1 callers
Method
Write
(p []byte)
goquery.go:22
↓ 1 callers
Function
attr
(c *selector, str string)
goquery.go:177
↓ 1 callers
Function
class
(c *selector, str string)
goquery.go:151
↓ 1 callers
Function
dumpLevel
(w io.Writer, n *Node, level int)
exp/html/parse_test.go:127
↓ 1 callers
Function
find
(ns *Nodes, selec string)
goquery.go:209
next →
1–100 of 196, ranked by callers