Skip to content

Commit

Permalink
Merge branch 'develop' into vuepress2
Browse files Browse the repository at this point in the history
  • Loading branch information
rejas committed Oct 4, 2024
2 parents 15117e1 + eac07b0 commit e61af2a
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 2,213 deletions.
2 changes: 2 additions & 0 deletions development/core-module-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ Whenever your module need to be updated, call the `updateDom(speed)` method. It
requests the MagicMirror core to update its dom object. If you define the speed,
the content update will be animated, but only if the content will really change.

Note that the rendering of the updated dom on the screen will happen asynchronously. You can listen for the [`DOM_OBJECTS_UPDATED` notification](/development/notifications.html) to know when the rendering is complete and the new dom is safe to interact with. This notification only fires if the content will really change.

As an example: the clock modules calls this method every second:

```javascript
Expand Down
3 changes: 2 additions & 1 deletion development/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ The system sends three notifications when starting up:
| `ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules. |
| `DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes. |
| `MODULE_DOM_CREATED` | _none_ | This module's dom has been fully loaded. You can now access your module's dom objects. |
| `MODULE_DOM_UPDATED` | _none_ | This module's dom has been updated and re-rendered. You can now access your module's (updated) dom objects. This notification is sent in response to a call to [`updateDom`](https://docs.magicmirror.builders/development/core-module-file.html#module-instance-methods). |

# Default module notifications

These notifications are send by the default modules:
These notifications are sent by the default modules:

| Notification | Payload | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Loading

0 comments on commit e61af2a

Please sign in to comment.