electron/docs/fiddles/windows/manage-windows/frameless-window/preload.js

5 lines
206 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('electronAPI', {
createFramelessWindow: (args) => ipcRenderer.send('create-frameless-window', args)
})