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

Method initializeSelect

deps/v8/tools/turbolizer/src/graphmultiview.ts:157–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 }
156
157 private initializeSelect(): void {
158 const view = this;
159 view.selectMenu.innerHTML = "";
160 for (const phase of view.sourceResolver.phases) {
161 const optionElement = document.createElement("option");
162 let maxNodeId = "";
163 if ((phase instanceof GraphPhase || phase instanceof TurboshaftGraphPhase)
164 && phase.highestNodeId != 0) {
165 maxNodeId = ` ${phase.highestNodeId}`;
166 }
167 optionElement.text = `${phase.name}${maxNodeId}`;
168 view.selectMenu.add(optionElement);
169 }
170 this.selectMenu.onchange = function (this: HTMLSelectElement) {
171 const phaseIndex = this.selectedIndex;
172 storageSetItem("lastSelectedPhase", phaseIndex);
173 view.displayPhase(view.sourceResolver.getDynamicPhase(phaseIndex));
174 };
175 }
176
177 private hideCurrentPhase(): SelectionStorage {
178 let rememberedSelection = null;

Callers 1

showMethod · 0.95

Calls 5

storageSetItemFunction · 0.90
createElementMethod · 0.80
displayPhaseMethod · 0.80
getDynamicPhaseMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected