Description
In the UI initialization script responsible for handling beginner/advanced mode, the current implementation uses innerHTML for updating icons and var for variable declarations and used redundant mode check for null.
Expected Behavior
- DOM updates should use textContent instead of innerHTML
- Variables should use const and let instead of var
Current Behavior
UI updates use:
modeIcon.innerHTML = "star";
Uses var for variable declarations
Proposed Changes
Replace innerHTML with textContent:
modeIcon.textContent = "star";
Replace var with const / let
Benefits
Improves performance by avoiding unnecessary HTML parsing
Reduces the risk of HTML injection
Aligns with modern JavaScript best practices
Checklist
Thank you for contributing to our project! We appreciate your help in improving it.
📚 See contributing instructions.
🙋🏾🙋🏼 Questions: Community Matrix Server.
Description
In the UI initialization script responsible for handling beginner/advanced mode, the current implementation uses innerHTML for updating icons and var for variable declarations and used redundant mode check for null.
Expected Behavior
Current Behavior
UI updates use:
Uses var for variable declarations
Proposed Changes
Replace innerHTML with textContent:
Replace var with const / let
Benefits
Improves performance by avoiding unnecessary HTML parsing
Reduces the risk of HTML injection
Aligns with modern JavaScript best practices
Checklist
Thank you for contributing to our project! We appreciate your help in improving it.
📚 See contributing instructions.
🙋🏾🙋🏼 Questions: Community Matrix Server.