Category: Electron Api
-
GlobalShortcut
Detect keyboard events when the application does not have keyboard focus. Process: Main The globalShortcut module can register/unregister a global keyboard shortcut with the operating system so that you can customize the operations for various shortcuts. Note: The shortcut is global; it will work even if the app does not have the keyboard focus. This module cannot be used…
-
Dialog
Display native system dialogs for opening and saving files, alerting, etc. Process: Main An example of showing a dialog to select multiple files: Methods The dialog module has the following methods: dialog.showOpenDialogSync([browserWindow, ]options) Returns string[] | undefined, the file paths chosen by the user; if the dialog is cancelled it returns undefined. The browserWindow argument allows the dialog to attach itself to…
-
DesktopCapturer
Access information about media sources that can be used to capture audio and video from the desktop using the navigator.mediaDevices.getUserMedia API. Process: Main The following example shows how to capture video from a desktop window whose title is Electron: See navigator.mediaDevices.getDisplayMedia for more information. Note: navigator.mediaDevices.getDisplayMedia does not permit the use of deviceId for selection of a source – see specification. Methods The desktopCapturer module has the following…
-
CrashReporter
Submit crash reports to a remote server. Process: Main, Renderer The following is an example of setting up Electron to automatically submit crash reports to a remote server: For setting up a server to accept and process crash reports, you can use following projects: Note: Electron uses Crashpad, not Breakpad, to collect and upload crashes, but for the…
-
ContentTracing
Collect tracing data from Chromium to find performance bottlenecks and slow operations. Process: Main This module does not include a web interface. To view recorded traces, use trace viewer, available at chrome://tracing in Chrome. Note: You should not use this module until the ready event of the app module is emitted. Methods The contentTracing module has the following methods: contentTracing.getCategories() Returns Promise<string[]> – resolves with an…
-
Clipboard
Perform copy and paste operations on the system clipboard. Process: Main, Renderer (non-sandboxed only) On Linux, there is also a selection clipboard. To manipulate it you need to pass selection to each method: Methods The clipboard module has the following methods: Note: Experimental APIs are marked as such and could be removed in future. clipboard.readText([type]) Returns string – The content in the clipboard as plain text. clipboard.writeText(text[,…
-
BrowserWindow
Create and control browser windows. Process: Main This module cannot be used until the ready event of the app module is emitted. Window customization The BrowserWindow class exposes various ways to modify the look and behavior of your app’s windows. For more details, see the Window Customization tutorial. Showing the window gracefully When loading a page in the window directly, users may see the…
-
BrowserView
Note The BrowserView class is deprecated, and replaced by the new WebContentsView class. A BrowserView can be used to embed additional web content into a BrowserWindow. It is like a child window, except that it is positioned relative to its owning window. It is meant to be an alternative to the webview tag. Class: BrowserView Create and control views. Note The BrowserView class is deprecated, and replaced by…
-
BaseWindow
Create and control windows. Process: Main Note BaseWindow provides a flexible way to compose multiple web views in a single window. For windows with only a single, full-size web view, the BrowserWindow class may be a simpler option. This module cannot be used until the ready event of the app module is emitted. Parent and child windows By using parent option, you can create child windows:…
-
AutoUpdater
Enable apps to automatically update themselves. Process: Main See also: A detailed guide about how to implement updates in your application. autoUpdater is an EventEmitter. Platform Notices Currently, only macOS and Windows are supported. There is no built-in support for auto-updater on Linux, so it is recommended to use the distribution’s package manager to update your app. In addition,…