MCPcopy
hub / github.com/bubkoo/html-to-image / decorate

Function decorate

src/clone-node.ts:189–202  ·  view source on GitHub ↗
(
  nativeNode: T,
  clonedNode: T,
  options: Options,
)

Source from the content-addressed store, hash-verified

187}
188
189function decorate<T extends HTMLElement>(
190 nativeNode: T,
191 clonedNode: T,
192 options: Options,
193): T {
194 if (isInstanceOfElement(clonedNode, Element)) {
195 cloneCSSStyle(nativeNode, clonedNode, options)
196 clonePseudoElements(nativeNode, clonedNode, options)
197 cloneInputValue(nativeNode, clonedNode)
198 cloneSelectValue(nativeNode, clonedNode)
199 }
200
201 return clonedNode
202}
203
204async function ensureSVGSymbols<T extends HTMLElement>(
205 clone: T,

Callers 1

cloneNodeFunction · 0.85

Calls 5

isInstanceOfElementFunction · 0.90
clonePseudoElementsFunction · 0.90
cloneCSSStyleFunction · 0.85
cloneInputValueFunction · 0.85
cloneSelectValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…