loadFile = async function (fileName) {
		const extension = fileName.slice((Math.max(0, fileName.lastIndexOf(".")) || Infinity) + 1);
		let script, stylesheet;

		switch (extension.toLowerCase()) {
			case "js":
				return new Promise((resolve) => {
					Log.log(`Load script: ${fileName}`);
					script = document.createElement("script");
					script.type = "text/javascript";
					script.src = fileName;
					script.onload = function () {
						resolve();
					};
					script.onerror = function () {
						Log.error("Error on loading script:", fileName);
						script.remove();
						resolve();
					};
					document.getElementsByTagName("body")[0].appendChild(script);
				});
			case "css":
				return new Promise((resolve) => {
					Log.log(`Load stylesheet: ${fileName}`);

					stylesheet = document.createElement("link");
					stylesheet.rel = "stylesheet";
					stylesheet.type = "text/css";
					stylesheet.href = fileName;
					stylesheet.onload = function () {
						resolve();
					};
					stylesheet.onerror = function () {
						Log.error("Error on loading stylesheet:", fileName);
						stylesheet.remove();
						resolve();
					};
					document.getElementsByTagName("head")[0].appendChild(stylesheet);
				});
		}
	}
Load a script or stylesheet by adding it to the dom.
@param {string} fileName Path of the file we want to load.
@returns {Promise} resolved when the file is loaded