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

6 lines
175 B
JavaScript
Raw Normal View History

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('electronAPI', {
saveDialog: () => ipcRenderer.invoke('save-dialog')
})