// Dynamically loads libraries and bootstraps the application (async ()=>{ // Add a loader here if any const root = document.getElementById('root') if(root) root.innerHTML= `
My app has loaded!!
`; try { // Load app const [ appModule, ] = await Promise.all([ import("./batman.js"), ]); console.log("Bootstrapped, ready to go!"); // Wait for DOM to be ready if(document.readyState === 'loading') { await new Promise((resolve)=>document.addEventListener('DOMContentLoaded', resolve)); } // Start the app! root.innerHTML = `
${appModule.batman}
`; }catch(err){ console.error(err); } })()