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

Function cloneInputValue

src/clone-node.ts:166–174  ·  view source on GitHub ↗
(nativeNode: T, clonedNode: T)

Source from the content-addressed store, hash-verified

164}
165
166function cloneInputValue<T extends HTMLElement>(nativeNode: T, clonedNode: T) {
167 if (isInstanceOfElement(nativeNode, HTMLTextAreaElement)) {
168 clonedNode.innerHTML = nativeNode.value
169 }
170
171 if (isInstanceOfElement(nativeNode, HTMLInputElement)) {
172 clonedNode.setAttribute('value', nativeNode.value)
173 }
174}
175
176function cloneSelectValue<T extends HTMLElement>(nativeNode: T, clonedNode: T) {
177 if (isInstanceOfElement(nativeNode, HTMLSelectElement)) {

Callers 1

decorateFunction · 0.85

Calls 1

isInstanceOfElementFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…