-
- Downloads
feat: Refactor Select and Updater for improved readability and functionality
Summary of changes - Updated `select.mjs` to clarify observer context - Refactored `updater.mjs` for cleaner change application In `select.mjs`: - Added a comment to indicate the observer context is a `ProxyObserver`, improving code readability and making intentions clear. - This change helps future developers quickly understand the purpose of the code, reducing potential confusion. In `updater.mjs`: - Simplified the while loop condition to check `this[pendingDiffsSymbol].length` directly. - Refactored the change application logic into a private method `#applyChange`, consolidating the steps of removing, inserting, updating content, and attributes into a single place. - This makes the code cleaner and more maintainable, reducing duplication and enhancing readability.
Loading
Please register or sign in to comment