electron/docs/fiddles/windows/manage-windows/manage-window-state/renderer.js
Milan Burda 24c9cbcc0a
docs: handle opening links in the default browser in main.js (#39379)
docs: handle opening links in the default browser in the main process
2023-08-08 12:35:59 +02:00

13 lines
455 B
JavaScript

const { ipcRenderer } = require('electron')
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
})
manageWindowBtn.addEventListener('click', (event) => {
ipcRenderer.send('create-demo-window')
})