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

Function markDirty

src/ink/dom.ts:393–413  ·  view source on GitHub ↗
(node?: DOMNode)

Source from the content-addressed store, hash-verified

391 * Also marks yoga dirty for text remeasurement if this is a text node.
392 */
393export const markDirty = (node?: DOMNode): void => {
394 let current: DOMNode | undefined = node
395 let markedYoga = false
396
397 while (current) {
398 if (current.nodeName !== '#text') {
399 ;(current as DOMElement).dirty = true
400 // Only mark yoga dirty on leaf nodes that have measure functions
401 if (
402 !markedYoga &&
403 (current.nodeName === 'ink-text' ||
404 current.nodeName === 'ink-raw-ansi') &&
405 current.yogaNode
406 ) {
407 current.yogaNode.markDirty()
408 markedYoga = true
409 }
410 }
411 current = current.parentNode
412 }
413}
414
415// Walk to root and call its onRender (the throttled scheduleRender). Use for
416// DOM-level mutations (scrollTop changes) that should trigger an Ink frame

Callers 12

createRendererFunction · 0.85
hideInstanceFunction · 0.85
unhideInstanceFunction · 0.85
appendChildNodeFunction · 0.85
insertBeforeNodeFunction · 0.85
removeChildNodeFunction · 0.85
setAttributeFunction · 0.85
setStyleFunction · 0.85
setTextStylesFunction · 0.85
setTextNodeValueFunction · 0.85
scrollMutatedFunction · 0.85
scrollToBottomFunction · 0.85

Calls 1

markDirtyMethod · 0.45

Tested by

no test coverage detected