Fix switchTab function scope for ES6 module compatibility
- Expose switchTab to window object so onclick handlers can access it - Fixes "switchTab is not defined" error when using type="module" - Module-scoped functions are not accessible from inline HTML onclick handlers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -958,7 +958,8 @@
|
||||
// ========================================
|
||||
// Tab Switching
|
||||
// ========================================
|
||||
function switchTab(tabName) {
|
||||
// Expose switchTab globally so onclick handlers can access it
|
||||
window.switchTab = function(tabName) {
|
||||
// Hide all tabs
|
||||
document.querySelectorAll('.tab-content').forEach(tab => {
|
||||
tab.classList.remove('active');
|
||||
|
||||
Reference in New Issue
Block a user