class CustomApp { constructor() { window.addEventListener('message', (event) => { if (!event.data) return const e = event.data if (e.customevent === 'test') { console.log(`TEST!`) } }) } } const customApp = new CustomApp()