Skip to content

Include preload scripts - exposeInMainWorld #838

@whyboris

Description

@whyboris

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 😠

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions