Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  16] [ 3]  / answers: 1 / hits: 30700  / 8 Years ago, tue, august 9, 2016, 12:00:00

How to replace the function of javascript prompt in electron?



Can someone give me an example?



I tried to use the function prompt, but got an error:




Uncaught Error: prompt() is and will not be supported.



More From » electron

 Answers
4

prompt, confirm and alert are functions which blocks the execution thread of the script until a user input and that's the reason electron team didn't supported it. Instead you can use some third party package for the same reason.



Here are some packages which provides this functionality in async way



https://www.npmjs.com/package/smalltalk



https://www.npmjs.com/package/vex-js



https://www.npmjs.com/package/dialogs


[#61084] Sunday, August 7, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jabari

Total Points: 580
Total Questions: 85
Total Answers: 110

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
jabari questions
;