Skip to content

Instantly share code, notes, and snippets.

@imansigupta
Created June 16, 2020 17:34
Show Gist options
  • Save imansigupta/d921a8aa14d91061b269c2d1000bbce0 to your computer and use it in GitHub Desktop.
Save imansigupta/d921a8aa14d91061b269c2d1000bbce0 to your computer and use it in GitHub Desktop.
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