mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
- [x] Base your pull requests against the `develop` branch. - [x] Include these infos in the description: > - Does the pull request solve a **related** issue? Yes - solves #3534 > - If so, can you reference the issue like this `Fixes #<issue_number>`? Fixes #3534 (also mentioned in commit message) > - What does the pull request accomplish? Use a list if needed. > > - Adds a new notification (`DOM_OBJECTS_UPDATED`) when the DOM is updated via `updateDom` - [x] Please run `npm run lint:prettier` before submitting - [x] Don't forget to add an entry about your changes to the CHANGELOG.md file. More info can be found in #3534, but as a summary: The `updateDom` function is not synchronous - there is an undetermined amount of time between when it completes and when the DOM has actually been re-rendered and is ready for interaction. The existing notification (`MODULE_DOM_CREATED`) only fires once on the initial DOM render. This PR solves the issue of subsequent re-renders by adding a new notification that fires whenever the DOM is ready after an update. This notification falls within expected lifecycle notifications (very similar to other libraries that provide DOM lifecycle notifications).