angular-electron icon indicating copy to clipboard operation
angular-electron copied to clipboard

Include preload scripts - exposeInMainWorld

Open whyboris opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe. To drag & drop a file into Electron you now have to use contextBridge :trollface: (Electron making you jump through hoops)

Documentation: https://www.electronjs.org/docs/latest/api/context-bridge

Describe the solution you'd like I would love an example preload.js file to be included with a working example of contextBridge.exposeInMainWorld('lol', {}) and successful invocation from within the app (window.lol).

Describe alternatives you've considered I tried to get exposeInMainWorld to work and nothing works for me 😢

Additional context Electron did away with simple Drag & Drop functionality, and now I have to have 20+ lines of extra code to get it to work, and I've not gotten anything to work despite hours of trying 😠

whyboris avatar Oct 26 '25 19:10 whyboris