Type: () => void
If use a frameless window which hide the system's native window controls, we may need to create custom window controls in HTML.
The frameless window ipc allow the renderer process to control the browser window.
The ipc channel named win:invoke
.
Example:
import { app } from 'electron'
import { optimizer } from '@electron-toolkit/utils'
app.whenReady().then(() => {
optimizer.registerFramelessWindowIpc()
})
ipcRenderer.send('win:invoke', 'show')
ipcRenderer.send('win:invoke', 'showInactive')
ipcRenderer.send('win:invoke', 'min')
ipcRenderer.send('win:invoke', 'max')
ipcRenderer.send('win:invoke', 'close')