DOM Ready on BrowserWindow


I am doing a BrowserWindow.loadUrl(); and am wondering how to access an dom on ready event. I tried BrowserWindow.webContents.loadUrl() and the BrowserWindow.webContents.on('dom-ready', function()); with no success as well.


You can use the ipc module to send messages between the renderer and main processes.


I tried that as well… ReferenceError: require is not defined


Could you post more of the code you’re trying to run?


Figured it out, was using "node-integration": false option on the BrowserWindow object, bad advice from a separate post. My solution was to npm install jquery and then just window.$ = window.jQuery = require('jquery'); from my renderer process js file.