I have very specific use case, where I need to create a global structure in renderer's window.
The structure contains initial values and is going to be modified later by renderer process (so context bridge is out of the way here, since it's read only). Those values I want to fetch from main process.
It's not possible to use top level await either (because of how Electron runs the preload)
My question is: Is there any way to await that code, to make sure all promises resolved before loading the site?