Comments (5)
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.
Reopening because it now crashes when used from the main process
from electron-prompt.
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.
@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.
Yes, it works! Tysm!
from electron-prompt.
Related Issues (20)
- electron-prompt cannot be used if I compile a exe program
- Error: Image could not be created from \n HOT 2
- Suggestion : Allow 'minimizable' for BrowserWindow in opts HOT 1
- Include a LICENSE file at the root of the repo HOT 4
- Validate form on Enter/return key pressed HOT 5
- Feature Request: allow creating an inescapable prompt HOT 1
- If you're using this in electron-react-boilerplate...
- Prompt window closes immediately for some Linux users HOT 2
- Preview electron-prompt HOT 2
- Label and Input issue HOT 3
- ERR_FILE_NOT_FOUND (-6) loading HOT 1
- [feature request]Add a 'swapButtons' option
- Add typescript support? (`d.ts` file) HOT 2
- testing example prompt: label and input field not displayed, cancel and ok buttons unstyled HOT 2
- Issue with promise HOT 1
- Add support for MacBook's touchbar
- Using a single JS file to do the prompt
- Can't make it work with Electron 19
- [feature request] Multi prompt for example having 2 or 3... input forms
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-prompt.