UpdateDom not working
@sharmmoh1983 all the Dom objects for all modules are created automatically when MagicMirror starts. This is not under your control, even for your own module. Your
getDom()routine is called when your module’s Dom object is initially created. This is why it is common to see a conditional in
getDom()routines that returns something like a simple string (e.g.: “Loading…”). Once your Dom object has been created, you can call
updateDom()at your discretion to make changes to whatever your module displays. If you don’t want your module to display anything, then don’t specify a location in the config for your module. If a location is specified, SOMETHING will appear there, even if you don’t have a
You can’t make changes to another module’s Dom object, but you can hide or show it. However, you can’t do that until that Dom object is initially created.
When all the Dom objects for all modules have been created at startup, MagicMirror dispatches the
DOM_OBJECTS_CREATEDnotification. By waiting for this notification, you can be sure that any module you attempt to hide will be hidden.