MCPcopy Index your code
hub / github.com/python/cpython / toggleSection

Function toggleSection

Lib/profiling/sampling/_flamegraph_assets/flamegraph.js:162–171  ·  view source on GitHub ↗
(sectionId)

Source from the content-addressed store, hash-verified

160}
161
162function toggleSection(sectionId) {
163 const section = document.getElementById(sectionId);
164 if (section) {
165 section.classList.toggle('collapsed');
166 // Save state
167 const collapsedSections = JSON.parse(localStorage.getItem('flamegraph-collapsed-sections') || '{}');
168 collapsedSections[sectionId] = section.classList.contains('collapsed');
169 localStorage.setItem('flamegraph-collapsed-sections', JSON.stringify(collapsedSections));
170 }
171}
172
173// Restore theme from localStorage, or use browser preference
174function restoreUIState() {

Callers

nothing calls this directly

Calls 4

getElementByIdMethod · 0.80
toggleMethod · 0.45
parseMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…