MCPcopy Create free account
hub / github.com/nodejs/node / updateSelection

Method updateSelection

deps/v8/tools/turbolizer/src/views/code-view.ts:194–204  ·  view source on GitHub ↗
(scrollIntoView: boolean = false)

Source from the content-addressed store, hash-verified

192 }
193
194 private updateSelection(scrollIntoView: boolean = false): void {
195 const mkVisible = new ViewElements(this.divNode.parentNode as HTMLElement);
196 for (const [sp, els] of this.sourcePositionToHtmlElements.entries()) {
197 const isSelected = this.sourcePositionSelection.isKeySelected(sp);
198 for (const el of els) {
199 mkVisible.consider(el, isSelected);
200 el.classList.toggle("selected", isSelected);
201 }
202 }
203 mkVisible.apply(scrollIntoView);
204 }
205
206 private getCodeHtmlElementName(): string {
207 return `source-pre-${this.source.sourceId}`;

Callers 5

selectMethod · 0.45
clearSelectionFunction · 0.45
selectionHandlerSelectFunction · 0.45

Calls 4

considerMethod · 0.95
applyMethod · 0.95
isKeySelectedMethod · 0.80
entriesMethod · 0.45

Tested by

no test coverage detected