MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / snapshotText

Function snapshotText

packages/sdk/src/document.ts:32–35  ·  view source on GitHub ↗
(el: Element)

Source from the content-addressed store, hash-verified

30// whitespace text nodes). The raw text target is shared with setText so shadow
31// value checks and dispatch serialization use the same DOM target.
32function snapshotText(el: Element): string | null {
33 const trimmed = getOwnText(el).trim();
34 return trimmed.length > 0 ? trimmed : null;
35}
36
37// Parsing the GSAP script (acorn AST walk) is the expensive part and depends
38// only on the script text, so memoize the {tween id, selector} pairs by script.

Callers 1

buildElementFunction · 0.85

Calls 1

getOwnTextFunction · 0.85

Tested by

no test coverage detected