Can I run node.js functions in a webview?


#1

I have an application which loads pages in a webview and I want to create the applications settings in html pages so they can open inline with the app.

I have created a webview with nodeintegration and then tried linking my SaveLoad.js in the HTML settings page but when the page loads in electron it fails to call any of the functions within the script.

Has anyone got any tips for how I could call application functions from a webview?

As an example my application has a webview which when the application is launched opened a index.html file within my local project.

SaveLoad.js controls the saving and loading of Json files in my project and using node.js. this is used by the main app and also needs to be used by client pages.

Index.html (my startup page) gets opened in a webview but needs to retrieve get functions from SaveLoad.js.

Any information on how this could be achieved would be great.