Thales Thales - 1 year ago 242
Javascript Question

Prompt on Electron

How to replace the function of javascript

on electron?

Can someone take me a example?

I try to use this function
, but an error occurs:

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

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download