MCPcopy
hub / github.com/preactjs/preact / serializeHtml

Function serializeHtml

test/_util/helpers.jsx:75–83  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

73}
74
75export function serializeHtml(node) {
76 let str = '';
77 let child = node.firstChild;
78 while (child) {
79 str += serializeDomTree(child);
80 child = child.nextSibling;
81 }
82 return str;
83}
84
85/**
86 * Serialize a DOM tree.

Callers 10

Children.test.jsxFile · 0.90
render.test.jsxFile · 0.90
svg.test.jsxFile · 0.90
hydrate.test.jsxFile · 0.90
render.test.jsxFile · 0.90
prop-types.test.jsFile · 0.90

Calls 1

serializeDomTreeFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…