MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / createModuleDom

Function createModuleDom

js/main.js:72–80  ·  view source on GitHub ↗

* Create and render a module DOM, then notify the module. * @param {Module} module The module to render. * @param {string|null} haveAnimateIn Optional animateIn animation name. * @returns {Promise } Resolved when module DOM is created.

(module, haveAnimateIn)

Source from the content-addressed store, hash-verified

70 * @returns {Promise<void>} Resolved when module DOM is created.
71 */
72async function createModuleDom (module, haveAnimateIn) {
73 if (haveAnimateIn) {
74 await _updateDom(module, { options: { speed: 1000, animate: { in: haveAnimateIn } } }, true);
75 } else {
76 await _updateDom(module, 0);
77 }
78
79 _sendNotification("MODULE_DOM_CREATED", null, null, module);
80}
81
82/**
83 * Select the wrapper dom object for a specific position.

Callers 1

createDomObjectsFunction · 0.85

Calls 2

_updateDomFunction · 0.85
_sendNotificationFunction · 0.85

Tested by

no test coverage detected