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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
237 B
JavaScript
Raw Normal View History

const { ipcRenderer } = require('electron')
const dragFileLink = document.getElementById('drag-file-link')
dragFileLink.addEventListener('dragstart', event => {
event.preventDefault()
ipcRenderer.send('ondragstart', __filename)
})