updateDomWithContent = function (module, speed, newHeader, newContent, animateOut, animateIn, createAnimatedDom = false) {
		return new Promise(function (resolve) {
			if (module.hidden || !speed) {
				updateModuleContent(module, newHeader, newContent);
				resolve();
				return;
			}

			if (!moduleNeedsUpdate(module, newHeader, newContent)) {
				resolve();
				return;
			}

			if (!speed) {
				updateModuleContent(module, newHeader, newContent);
				resolve();
				return;
			}

			if (createAnimatedDom && animateIn !== null) {
				Log.debug(`${module.identifier} createAnimatedDom (${animateIn})`);
				updateModuleContent(module, newHeader, newContent);
				if (!module.hidden) {
					showModule(module, speed, null, { animate: animateIn });
				}
				resolve();
				return;
			}

			hideModule(
				module,
				speed / 2,
				function () {
					updateModuleContent(module, newHeader, newContent);
					if (!module.hidden) {
						showModule(module, speed / 2, null, { animate: animateIn });
					}
					resolve();
				},
				{ animate: animateOut }
			);
		});
	}
Update the dom with the specified content
@param {Module} module The module that needs an update.
@param {number} [speed] The (optional) number of microseconds for the animation.
@param {string} newHeader The new header that is generated.
@param {HTMLElement} newContent The new content that is generated.
@param {string} [animateOut] AnimateCss animation name before hidden
@param {string} [animateIn] AnimateCss animation name on show
@param {boolean} [createAnimatedDom] for displaying only animateIn (used on first start)
@returns {Promise} Resolved when the module dom has been updated.