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

Function toggleAllBytecode

Lib/profiling/sampling/_heatmap_assets/heatmap.js:682–700  ·  view source on GitHub ↗

* Toggle all bytecode panels at once

()

Source from the content-addressed store, hash-verified

680 * Toggle all bytecode panels at once
681 */
682function toggleAllBytecode() {
683 const buttons = document.querySelectorAll('.bytecode-toggle');
684 if (buttons.length === 0) return;
685
686 const someExpanded = Array.from(buttons).some(b => b.classList.contains('expanded'));
687 const expandAllBtn = document.getElementById('toggle-all-bytecode');
688
689 buttons.forEach(button => {
690 const isExpanded = button.classList.contains('expanded');
691 if (someExpanded ? isExpanded : !isExpanded) {
692 toggleBytecode(button);
693 }
694 });
695
696 // Update the expand-all button state
697 if (expandAllBtn) {
698 expandAllBtn.classList.toggle('expanded', !someExpanded);
699 }
700}
701
702// Keyboard shortcut: 'b' toggles all bytecode panels, Enter/Space activates toggle switches
703document.addEventListener('keydown', function(e) {

Callers 1

heatmap.jsFile · 0.85

Calls 6

toggleBytecodeFunction · 0.85
getElementByIdMethod · 0.80
someMethod · 0.45
fromMethod · 0.45
containsMethod · 0.45
toggleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…