MCPcopy Create free account
hub / github.com/codeaashu/claude-code / setTextNodeValue

Function setTextNodeValue

src/ink/dom.ts:425–437  ·  view source on GitHub ↗
(node: TextNode, text: string)

Source from the content-addressed store, hash-verified

423}
424
425export const setTextNodeValue = (node: TextNode, text: string): void => {
426 if (typeof text !== 'string') {
427 text = String(text)
428 }
429
430 // Skip if unchanged
431 if (node.nodeValue === text) {
432 return
433 }
434
435 node.nodeValue = text
436 markDirty(node)
437}
438
439function isDOMElement(node: DOMElement | TextNode): node is DOMElement {
440 return node.nodeName !== '#text'

Callers 4

hideTextInstanceFunction · 0.85
unhideTextInstanceFunction · 0.85
commitTextUpdateFunction · 0.85
createTextNodeFunction · 0.85

Calls 1

markDirtyFunction · 0.85

Tested by

no test coverage detected