Created
June 16, 2020 17:34
-
-
Save imansigupta/d921a8aa14d91061b269c2d1000bbce0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mainWindow; | |
app.on('ready', () => { | |
mainWindow = new BrowserWindow({ | |
width: 1536, | |
height: 900, | |
frame: true, | |
webPreferences: { | |
nodeIntegration: true | |
} | |
}); | |
mainWindow.loadURL('file://' + __dirname + '/index.html'); | |
}) | |
var user = "Coded By Mansi Gupta" | |
function changeInDom(user) { | |
let code = ` | |
var p = document.getElementById("content_styler"); | |
p.innerHTML = "I am the changed text. "+"${user}"; | |
`; | |
mainWindow.webContents.executeJavaScript(code); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment