I\'m trying to write a wrapper for Twitter using Electron (formerly Atom Shell).
My main.js file (it looks almost identical to the \"Hello World\" examp
The proper way is to use contents.send('some_js_Method','parameters') to invoke a javascript method in a web page from main.js
// In the main.js
const {app, BrowserWindow} = require('electron')
let win = null
app.on('ready', () => {
win = new BrowserWindow({width: 800, height: 600})
win.loadURL(`file://${__dirname}/index.html`)
win.webContents.send(some_js_Method', 'window created!') //calling js method (async call)
})
//in index.html