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

6 lines
172 B
JavaScript

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