When you download a new file, the Electron shell will automatically ask you to select a location to save the file in your disc. The previous example shows you how to override this behavior by setting a file path for each download in your application. What if, you need to show the save dialog programmatically? Let's check how we can show native dialog API to work with dialog boxes, such as file dialog, custom alerts, and information messages.
Usually, you don't need to access native renderer process from your web pages since you have JavaScript dialog API. We won't have to use that as well, as we have custom JavaScript user interface plugins available for better dialog and windows. However, in the main process, as the context is different, we need to use some native window API as we don't have any user interface present for that process. Luckily the Electron provides a dialog API, which gives access to native dialog user interface component from the main process. Open...