MCPcopy Create free account
hub / github.com/Noumena-Network/code / scrollMutated

Function scrollMutated

src/ink/components/ScrollBox.tsx:110–124  ·  view source on GitHub ↗
(el: DOMElement)

Source from the content-addressed store, hash-verified

108 for (const l of listenersRef.current) l();
109 };
110 function scrollMutated(el: DOMElement): void {
111 // Signal background intervals (IDE poll, LSP poll, GCS fetch, orphan
112 // check) to skip their next tick — they compete for the event loop and
113 // contributed to 1402ms max frame gaps during scroll drain.
114 markScrollActivity();
115 markDirty(el);
116 markCommitStart();
117 notify();
118 if (renderQueuedRef.current) return;
119 renderQueuedRef.current = true;
120 queueMicrotask(() => {
121 renderQueuedRef.current = false;
122 scheduleRenderFrom(el);
123 });
124 }
125 useImperativeHandle(ref, (): ScrollBoxHandle => ({
126 scrollTo(y: number) {
127 const el = domRef.current;

Callers 3

scrollToFunction · 0.85
scrollToElementFunction · 0.85
scrollByFunction · 0.85

Calls 5

markScrollActivityFunction · 0.85
markDirtyFunction · 0.85
markCommitStartFunction · 0.85
scheduleRenderFromFunction · 0.85
notifyFunction · 0.70

Tested by

no test coverage detected