• Mahmoud Aglan's avatar
    fix: chess board init — sequential script loading + DOM verification · 677320c2
    Mahmoud Aglan authored
    The board was empty because:
    1. Scripts cached from previous nav resolved immediately
    2. Board/Game singletons kept stale DOM references
    3. Race condition between DOM render and script execution
    
    Fix:
    - Remove existing script tags before re-adding (forces re-execution)
    - Load scripts SEQUENTIALLY (chess.min → openings → board → game)
    - requestAnimationFrame before script loading (DOM settle)
    - Explicit document.getElementById('board') check before Board.init
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    677320c2
index.php 41.3 KB