In one .js file I have
window.functionName = function(){
}
Now I want to call the function in the main electron file. How can I do that?
Here is what I tried to do in the main electron file:
const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
var focusedWindow = BrowserWindow.getFocusedWindow();
focusedWindow.functionName();
It does not work. Why?