electron/docs/fiddles/windows/manage-windows/manage-window-state/renderer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
464 B
JavaScript
Raw Normal View History

const { ipcRenderer } = require('electron/renderer')
2020-08-27 14:31:51 +00:00
const manageWindowBtn = document.getElementById('manage-window')
ipcRenderer.on('bounds-changed', (event, bounds) => {
const manageWindowReply = document.getElementById('manage-window-reply')
const message = `Size: ${bounds.size} Position: ${bounds.position}`
manageWindowReply.textContent = message
})
2020-08-27 14:31:51 +00:00
manageWindowBtn.addEventListener('click', (event) => {
ipcRenderer.send('create-demo-window')
2020-08-27 14:31:51 +00:00
})