While starting to sort my js files in a recent Electron project I stopped being able to webview.executeJavascript webview being a variable that is a querySelector on my webview.
I tried testing to see if it getting the webview from the DOM and it is, all I did was move the code that worked perfectly into a module and now executeJavascript Is no longer a function.
If anybody knows the reason or has a clue whats wrong that'd be helpful!
var bar = require('./file.js')