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

12 lines
411 B
JavaScript
Raw Permalink Normal View History

2020-08-27 08:31:51 -06:00
const manageWindowBtn = document.getElementById('manage-window')
window.electronAPI.onBoundsChanged((event, bounds) => {
const manageWindowReply = document.getElementById('manage-window-reply')
const message = `Size: ${bounds.size} Position: ${bounds.position}`
manageWindowReply.textContent = message
})
2020-08-27 08:31:51 -06:00
manageWindowBtn.addEventListener('click', (event) => {
window.electronAPI.createDemoWindow()
2020-08-27 08:31:51 -06:00
})