In my electron application, I have a frameless window which is created once i click a button. A new html template is loaded in. This is then the new window which is being focussed on.
When i click on one of the buttons within this window I want to alter the appearance of some of the elements that are within the index.html.
My question is how would I be able to put the focus on both of the browser windows, or is there a way to load in the elements (Ids and classes) of the index.html page so i can have easy access to them in my JS file?
I’ve tried to do something like below, but this didn’t work.
const mainWin = remote.BrowserWindow.getFocusedWindow(); mainWin.getParentWindow(); mainWin.focus();
I’ve seen people using the localStorage on forums, but I want to be able to have access to many of the elements.
Any advice would be brilliant, thankyou!