O'Reilly logo

Building Cross-Platform Desktop Applications with Electron by Muhammed Jasim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Native system dialogs

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required