#Error when trying to run executeJavascript()

6 messages · Page 1 of 1 (latest)

whole axle
#

Hello,

I would like to be able to insert the result of a function written in python that I get in the variable data but when I tried to insert the value of this variable, the command mainWindow.webContents.executeJavaScript(document.getElementById("h1-fs-s5").innerHTML = "${data.toString('utf8')}" ;); does not execute with the value of data when trying to concatenate and an error appears.

Here is my post on stackoverflow : https://stackoverflow.com/questions/74920016/error-when-trying-to-run-executejavascript

Regards,

frank crow
#

Use ipc

whole axle
#

Thank you for your reply. So I have to use IPC as soon as I want to modify the content of the page?

frank crow
#

You want to use ipc when you want to communicate with page

#

If you still want to use executejavascrip then fix error in code you want to execute