MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / htmlToDoc

Function htmlToDoc

lib/command/query.js:119–125  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

117}
118
119function htmlToDoc(html) {
120 const p5doc = parse5.parse(html, { sourceCodeLocationInfo: true })
121 const impl = new DOMImplementation()
122 const doc = impl.createDocument(null, null, null)
123 walkParse5(p5doc, doc, doc)
124 return { doc, source: html }
125}
126
127function walkParse5(p5node, xmlParent, xmlDoc) {
128 for (const child of p5node.childNodes || []) {

Callers 1

queryFunction · 0.85

Calls 1

walkParse5Function · 0.85

Tested by

no test coverage detected