Read the statement by Michael Teeuw here.
UpdateDom not working
-
@sharmmoh1983 instead of hide, how about using display:none in css?
-
Now i understand whats going on. You had tried to hide modules before dom created.
My suggetion is;- use css for making modules invisible with display:none on startup.(or cover all modules with temp div which has black background on top level)
- after Dom_object_created message received, hide all module with .hide().
- then change css again for displaying, or remove the covered div.
- then you can use your command.
-
@Sean
I will look into the approach but I don’t want every module to be off , some commanded by voice so can’t make use of css
-
@Sean Also updateDOM is also creating DOM first so there should be no issue of DOM getting created or not
-
@Sean @j-e-f-f Thanks for your support… i will try the discussed approach also and come back with my findings
-
@sharmmoh1983 said in UpdateDom not working:
I want all modules to hide during star
Yep you can do it. the
MM
object has a method calledgetModules()
which will give you all the loaded modules. Example:var modules = MM.getModules(); modules.enumerate(function(module) { module.hide(0, {lockString: "yourLockString"}); });
-
@j-e-f-f But where it call this as all modules will be loaded simultaneously
-
@j.e.f.f But where to call mentioned code as all modules will be loaded simultaneously
-
@sharmmoh1983 call it in your routine that responds to the
DOM_OBJECTS_CREATED
notification.You can’t hide a module before its Dom exists. When this notification is dispatched it means all modules have started AND their Dom objects have been created for the first time. It’s the earliest opportunity you have to hide any modules.
-
@j.e.f.f I am not generating DOM while start of the module but at voice command and this approach is working individually for the modules but not if all are coupled together So how come it is happening for individual modules