Hi,
By mainWindow
you mean in an Electron project from the main.js
file? If that is the case, mainWindow
is not exposed as a global variable and it should stay that way for security reasons. You can however try to send messages through IPC to your main.js
.
Example on this messaging mechanism from your previous question.
Normally if you have a JS file that you include in your project.html and that JS file has global variables/objects, then you can use those global variables/objects from an asm block. Do you experience issues with this?