* Update the dom for a specific module. * @param {Module} module The module that needs an update. * @param {object|number} [updateOptions] The (optional) number of microseconds for the animation or object with updateOptions (speed/animates)
(module, updateOptions)
| 655 | * @param {object|number} [updateOptions] The (optional) number of microseconds for the animation or object with updateOptions (speed/animates) |
| 656 | */ |
| 657 | async updateDom (module, updateOptions) { |
| 658 | if (!(module instanceof Module)) { |
| 659 | Log.error("updateDom: Sender should be a module."); |
| 660 | return; |
| 661 | } |
| 662 | |
| 663 | if (!module.data.position) { |
| 664 | Log.warn("module tries to update the DOM without being displayed."); |
| 665 | return; |
| 666 | } |
| 667 | |
| 668 | // Further implementation is done in the private method. |
| 669 | await _updateDom(module, updateOptions); |
| 670 | // Once the update is complete and rendered, send a notification to the module that the DOM has been updated |
| 671 | _sendNotification("MODULE_DOM_UPDATED", null, null, module); |
| 672 | }, |
| 673 | |
| 674 | /** |
| 675 | * Returns a collection of all modules currently active. |
nothing calls this directly
no test coverage detected