This is a significant refactor of the logic to make it simpler, faster, more robust. There are likely still a couple gaps, especially around management of aria state, but user-behavior wise we're in business (see clip in #22 for reference)
Now the way it works is on document load it scans for all tabs with title R or Python. It then tracks those in an object and adds click handlers to all those tab panels that detects the language being clicked and makes sure all other tabpanels have that language activated and other languages deactivated. This does way less scanning of the entire dom, just that one initial scan, then the rest is targeting the specific elements
This is a significant refactor of the logic to make it simpler, faster, more robust. There are likely still a couple gaps, especially around management of aria state, but user-behavior wise we're in business (see clip in #22 for reference)
Now the way it works is on document load it scans for all tabs with title R or Python. It then tracks those in an object and adds click handlers to all those tab panels that detects the language being clicked and makes sure all other tabpanels have that language activated and other languages deactivated. This does way less scanning of the entire dom, just that one initial scan, then the rest is targeting the specific elements