DOM Ready on BrowserWindow


#1

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.


#2

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


#3

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


#4

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


#5

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.