I am trying to do something similar to this, as well as grab some HTML inside the
<webview>. I copied all this code and didn’t see anything that would infer it’s working (by way of
console.logs). Here is how I’m rendering my
"<webview class='tabs-pane active' id='' src='file://" + __dirname + "/pages/start.html' preload='file://" + __dirname + "/resources/scripts/browser.js' autosize='on'></webview>";
browser.js contains the code that is in
inject.js. I put the
<script> contents of
renderer process in my main script file.
Did I supply enough information for anyone to help me?
EDIT: Haha, nevermind. I discovered answers to another question in this forum which made the code here make sense. I’m good now, thanks for sharing.