IMPR: Create Metalighbox container

This commit is contained in:
Tony Air 2023-02-20 16:50:40 +02:00
parent abeb029acc
commit b18ede53ce

View File

@ -7,9 +7,12 @@
import Events from './_events'
import MetaWindow from './window'
const container = document.getElementById('MetaLightboxApp')
let container = document.getElementById('MetaLightboxApp');
if (!container) {
console.log('MetaWindow: missing container #MetaLightboxApp')
console.warn(`MetaWindow: missing container #MetaLightboxApp - create new one`);
container = document.createElement("div");
container.setAttribute("id", "MetaLightboxApp");
document.querySelector("body").append(container);
}
const init = () => {