class AboutMe{ static appID = "AboutMe" /** * @param {HTMLElement} appElem */ constructor(appElem){ this.appElem = appElem } /** * @param {[]string} args * @param {Object} runContext */ async NewWindow(args, runContext){ console.log(runContext) const params = new URLSearchParams({ isMobile: WebDesktopEnvironment.isMobile, path: `${runContext.bundlePath}/aboutme.props`, runContext: runContext, }) const response = await fetch(`/app/${AboutMe.appID}/render?`+ params) if (response.status != 200){ WebDesktopEnvironment.Alert("Error TODO") //TODO return } const html = await response.text() let newWindow = WebDesktopEnvironment.CreateNewWindow(this.appId, 360, document.body.clientHeight*0.8 ) newWindow.innerHTML = html newWindow.style.height = 'auto' newWindow.querySelector("#closeWindowButton").addEventListener('click', () => { WebDesktopEnvironment.CloseWindow(newWindow) }) } }