electron/docs/fiddles/native-ui/drag-and-drop/preload.js

5 lines
172 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('electronAPI', {
dragStart: () => ipcRenderer.send('ondragstart')
})