Git Product home page Git Product logo

Comments (5)

p-sam avatar p-sam commented on July 2, 2024

Hi, thanks for the issue, I think that a PR would be more approriate since you already proposed the changes required. So I'd say the right to do for you and for me is that you submit those changes as your contribution via pull request

from electron-prompt.

p-sam avatar p-sam commented on July 2, 2024

Reopening because it now crashes when used from the main process

from electron-prompt.

p-sam avatar p-sam commented on July 2, 2024

Delving a bit deeper in the subject, I'm realizing this is a much more problematic scenario and I made a mistake in merging this. Using @electron/remote is not a proper replacement to the remote module for our concerns as a lib, we should not force to use specifically this module since it also requires to be inited in the main process, which was not handled in the PR. As the @electron/remote README states, There is almost always a better way to accomplish your task than using this module, and so I'll invite anyone that want to use this in a renderer context to either build a 1 line handler using the handle/invoke IPC API or a more obvious and sensible solution which is to do a modal since you're already in a webpage anyway.

I'll be working on reverting the merged PR in some way, reinstating the renderer support that still works for older versions of Electrons, and possibly add a note on that matter in the README, closing the issue

from electron-prompt.

p-sam avatar p-sam commented on July 2, 2024

@kimlimjustin Please check that everything works for you using the latest develop commit, it should accomplish what you wanted. While usage from a renderer process was an afterthought added by a contributor, it probably would be a shame to lose the feature altoghether. But I made it so using the remote module would be a not-recommended and deliberate action, in order to push for better usage of IPC, and reduce the overall IPC overhead present in electron apps due to the overall laziness of the ecosystem. I'll probably push a release shortly after

from electron-prompt.

kimlimjustin avatar kimlimjustin commented on July 2, 2024

Yes, it works! Tysm!

from electron-prompt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.