MCPcopy Create free account
hub / github.com/PuerkitoBio/goquery / SetText

Method SetText

manipulation.go:335–337  ·  view source on GitHub ↗

SetText sets the content of each element in the selection to specified content. The provided text string is escaped.

(text string)

Source from the content-addressed store, hash-verified

333// SetText sets the content of each element in the selection to specified content.
334// The provided text string is escaped.
335func (s *Selection) SetText(text string) *Selection {
336 return s.SetHtml(html.EscapeString(text))
337}
338
339// Unwrap removes the parents of the set of matched elements, leaving the matched
340// elements (and their siblings, if any) in their place.

Callers 1

TestSetTextFunction · 0.80

Calls 1

SetHtmlMethod · 0.95

Tested by 1

TestSetTextFunction · 0.64