fix: resolve JavaScript const redeclaration and MarkitectMain issues
**JavaScript Fixes:** - Fixed const redeclaration error: removed duplicate MARKITECT_STRICT_MODE declaration from control-base.js - Fixed MarkitectMain not available: updated plugin to load main-updated.js instead of main.js - Added MARKITECT_STRICT_MODE declaration to main-updated.js for consistency - Ensured only one main file is loaded to prevent conflicts **Plugin Asset Updates:** - Changed testdrive-jsui plugin asset list from main.js to main-updated.js - Verified proper loading order and dependency resolution - All JavaScript constants now declared exactly once **Testing Infrastructure:** - Comprehensive JavaScript fix verification test - Browser-ready test file generation for manual verification - Automated const declaration conflict detection - Asset loading order validation **Key Fixes:** - ❌ "Uncaught SyntaxError: redeclaration of const MARKITECT_STRICT_MODE" → ✅ Resolved - ❌ "⚠️ MarkitectMain not available, edit functionality may be limited" → ✅ Resolved - ❌ Multiple main.js files causing conflicts → ✅ Single main-updated.js loaded **Verification Results:** ``` ✅ No const declaration conflicts ✅ MarkitectMain properly declared once ✅ Correct main-updated.js file loaded ✅ HTML references correct scripts ``` Browser console should now show: - 🎯 "TestDrive JSUI loading complete, initializing..." - 🚀 "Starting MarkitectMain initialization..." - ✅ No redeclaration errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ class TestDriveJSUIEngine(RenderingEnginePlugin):
|
||||
"static/js/controls/debug-control.js",
|
||||
"static/js/controls/edit-control.js",
|
||||
"static/js/config-loader.js",
|
||||
"static/js/main.js"
|
||||
"static/js/main-updated.js"
|
||||
],
|
||||
"css": [
|
||||
"static/css/editor.css",
|
||||
|
||||
Reference in New Issue
Block a user