How to give data to a newly loaded html file

I’m writing a journal app (trying to). Having got data from the db and displaying it, I’m now trying to add edit functionality so I’ve set up an edit.html file. From a ‘edit’ button on my main index.html I use an event listener to send the record’s id to the main process. In that ipcMain.on function I want to send that data to a newly loaded html file and have that file use the data. Using ipc I can send a message back to the calling event but that is now out of scope since I’m using mainWindow.loadFile(’./edit.html’) which has its own renderer. Getting confused here. Please can someone give me a steer on how this might be achieved?

In other words, if one loads an html file, what’s the best way to give its renderer some data?

Is there some guru that I can talk to? Getting help is proving hard…

Hey,
You know you could just use a relative link like any HTML document. You can have more infos here :


Hope that I responded to you.

If you need more help, mention me or MP me :+1: