MCPcopy
hub / github.com/PuerkitoBio/goquery / newDocument

Function newDocument

type.go:89–94  ·  view source on GitHub ↗

Private constructor, make sure all fields are correctly filled.

(root *html.Node, url *url.URL)

Source from the content-addressed store, hash-verified

87
88// Private constructor, make sure all fields are correctly filled.
89func newDocument(root *html.Node, url *url.URL) *Document {
90 // Create and fill the document
91 d := &Document{nil, url, root}
92 d.Selection = newSingleSelection(root, d)
93 return d
94}
95
96// Selection represents a collection of nodes matching some criteria. The
97// initial Selection can be created by using Document.Find, and then

Callers 4

NewDocumentFromNodeFunction · 0.85
NewDocumentFromReaderFunction · 0.85
NewDocumentFromResponseFunction · 0.85
CloneDocumentFunction · 0.85

Calls 1

newSingleSelectionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…