I have a webview inside my index.html page with a preload script and some code in my renderer process that affects the webview.
Right now I only have one webview, but I would ideally like to have multiple webviews that each operate independently of one another, similar to how a browser can have different tabs that can each run different websites and js.
How is it possible to do this? Can I somehow create an array of webviews? Could I possibly programatically give each webview a unique ID and operate on them then? What is the best way to manage this?
I also have IPC messages going to the preload script of my webview, so how can I keep these messages organized so that they would go to the correct webview?