electron/docs/fiddles/native-ui/dialogs/error-dialog/preload.js

6 lines
184 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('electronAPI', {
openErrorDialog: () => ipcRenderer.send('open-error-dialog')
})