From 54743a37f41a4e3602691ae25d663dd41abbc66f Mon Sep 17 00:00:00 2001 From: tong Date: Wed, 31 May 2023 02:05:26 +0200 Subject: [PATCH] Upgrade to electron v25.0.0 --- demo/package-lock.json | 14 +- demo/package.json | 2 +- electron-api.json | 2114 +++++++++++++++++++++----- haxedoc.hxml | 1 + haxelib.json | 2 +- src/electron/Event.hx | 7 - src/electron/Process.hx | 2 +- src/electron/UploadFile.hx | 2 +- src/electron/main/App.hx | 6 +- src/electron/main/BrowserWindow.hx | 28 +- src/electron/main/ClientRequest.hx | 14 +- src/electron/main/Dialog.hx | 4 +- src/electron/main/Net.hx | 20 + src/electron/main/Protocol.hx | 35 +- src/electron/main/Session.hx | 29 + src/electron/main/WebContents.hx | 58 +- src/electron/remote/App.hx | 6 +- src/electron/remote/BrowserWindow.hx | 28 +- src/electron/remote/ClientRequest.hx | 14 +- src/electron/remote/Dialog.hx | 4 +- src/electron/remote/Net.hx | 20 + src/electron/remote/Protocol.hx | 35 +- src/electron/remote/Session.hx | 29 + src/electron/remote/WebContents.hx | 58 +- src/electron/renderer/WebviewTag.hx | 28 + 25 files changed, 2113 insertions(+), 447 deletions(-) delete mode 100644 src/electron/Event.hx diff --git a/demo/package-lock.json b/demo/package-lock.json index 4249724a..30dc2d2c 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -9,7 +9,7 @@ "version": "0.3.0", "license": "MIT", "devDependencies": { - "electron": "v24.3.1" + "electron": "v25.0.0" } }, "node_modules/@electron/get": { @@ -242,9 +242,9 @@ "optional": true }, "node_modules/electron": { - "version": "24.3.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-24.3.1.tgz", - "integrity": "sha512-lKfC0umie1k5LW48troHzpPKJrqPEW+5j14/CPTC41K9+dJA98oUPt/05G7QAe8OGD4fHjQQuulfRdZ9MjjXeQ==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.0.0.tgz", + "integrity": "sha512-8Bjlpw52XW447RKjYGaaizWI4x0dv4gATNn7ssuonySbDgeJNqUnIJQGBrpXyB3VUROVmhXnTWB9VWRzv6uVlA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -985,9 +985,9 @@ "optional": true }, "electron": { - "version": "24.3.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-24.3.1.tgz", - "integrity": "sha512-lKfC0umie1k5LW48troHzpPKJrqPEW+5j14/CPTC41K9+dJA98oUPt/05G7QAe8OGD4fHjQQuulfRdZ9MjjXeQ==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.0.0.tgz", + "integrity": "sha512-8Bjlpw52XW447RKjYGaaizWI4x0dv4gATNn7ssuonySbDgeJNqUnIJQGBrpXyB3VUROVmhXnTWB9VWRzv6uVlA==", "dev": true, "requires": { "@electron/get": "^2.0.0", diff --git a/demo/package.json b/demo/package.json index 9c2553c2..91d83153 100644 --- a/demo/package.json +++ b/demo/package.json @@ -13,6 +13,6 @@ "start": "electron ." }, "devDependencies": { - "electron": "v24.3.1" + "electron": "v25.0.0" } } diff --git a/electron-api.json b/electron-api.json index 5b7db233..2e3a1109 100644 --- a/electron-api.json +++ b/electron-api.json @@ -4,8 +4,8 @@ "description": "> Control your application's event lifecycle.\n\nProcess: Main\n\nThe following example shows how to quit the application when the last window is closed:", "slug": "app", "websiteUrl": "https://electronjs.org/docs/api/app", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/app.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/app.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -1950,6 +1950,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -1977,6 +1978,9 @@ "type": "NotificationResponse" } ], + "additionalTags": [ + "os_macos" + ], "required": true } ], @@ -1999,6 +2003,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -2014,6 +2019,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -2029,6 +2035,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2036,6 +2043,7 @@ "description": "", "collection": false, "type": "Integer", + "additionalTags": [], "required": true } ], @@ -2051,6 +2059,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2059,6 +2068,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -2076,6 +2086,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2084,6 +2095,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -2101,6 +2113,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2108,6 +2121,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -2118,13 +2132,14 @@ }, { "name": "did-become-active", - "description": "Emitted when mac application become active. Difference from `activate` event is that `did-become-active` is emitted every time the app becomes active, not only when Dock icon is clicked or application is re-launched.", + "description": "Emitted when the application becomes active. This differs from the `activate` event in that `did-become-active` is emitted every time the app becomes active, not only when Dock icon is clicked or application is re-launched. It is also emitted when a user switches to the app via the macOS App Switcher.", "parameters": [ { "name": "event", "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -2133,6 +2148,24 @@ ], "urlFragment": "#event-did-become-active-macos" }, + { + "name": "did-resign-active", + "description": "Emitted when the app is no longer active and doesn’t have focus. This can be triggered, for example, by clicking on another application or by using the macOS App Switcher to switch to another application.", + "parameters": [ + { + "name": "event", + "description": "", + "collection": false, + "type": "Event", + "additionalTags": [], + "required": true + } + ], + "additionalTags": [ + "os_macos" + ], + "urlFragment": "#event-did-resign-active-macos" + }, { "name": "continue-activity", "description": "Emitted during Handoff when an activity from a different device wants to be resumed. You should call `event.preventDefault()` if you want to handle this event.\n\nA user activity can be continued only in an app that has the same developer Team ID as the activity's source app and that supports the activity's type. Supported activity types are specified in the app's `Info.plist` under the `NSUserActivityTypes` key.", @@ -2142,6 +2175,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2150,6 +2184,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2157,6 +2192,7 @@ "description": "Contains app-specific state stored by the activity on another device.", "collection": false, "type": "unknown", + "additionalTags": [], "required": true }, { @@ -2175,6 +2211,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -2192,6 +2229,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2200,6 +2238,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -2217,6 +2256,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2225,6 +2265,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2233,6 +2274,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -2250,6 +2292,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2258,6 +2301,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2265,6 +2309,7 @@ "description": "Contains app-specific state stored by the activity.", "collection": false, "type": "unknown", + "additionalTags": [], "required": true } ], @@ -2282,6 +2327,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2290,6 +2336,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2297,6 +2344,7 @@ "description": "Contains app-specific state stored by the activity.", "collection": false, "type": "unknown", + "additionalTags": [], "required": true } ], @@ -2314,6 +2362,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -2331,6 +2380,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2338,6 +2388,7 @@ "description": "", "collection": false, "type": "BrowserWindow", + "additionalTags": [], "required": true } ], @@ -2353,6 +2404,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2360,6 +2412,7 @@ "description": "", "collection": false, "type": "BrowserWindow", + "additionalTags": [], "required": true } ], @@ -2375,6 +2428,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2382,6 +2436,7 @@ "description": "", "collection": false, "type": "BrowserWindow", + "additionalTags": [], "required": true } ], @@ -2397,6 +2452,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2404,6 +2460,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -2419,6 +2476,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2426,6 +2484,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -2434,6 +2493,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2442,6 +2502,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2449,6 +2510,7 @@ "description": "", "collection": false, "type": "Certificate", + "additionalTags": [], "required": true }, { @@ -2466,6 +2528,7 @@ } ], "returns": null, + "additionalTags": [], "required": true }, { @@ -2473,6 +2536,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -2488,6 +2552,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2495,6 +2560,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -2502,6 +2568,7 @@ "description": "", "collection": false, "type": "URL", + "additionalTags": [], "required": true }, { @@ -2509,6 +2576,7 @@ "description": "", "collection": true, "type": "Certificate", + "additionalTags": [], "required": true }, { @@ -2526,6 +2594,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -2541,6 +2610,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2548,6 +2618,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -2565,6 +2636,7 @@ "type": "URL" } ], + "additionalTags": [], "required": true }, { @@ -2617,6 +2689,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true }, { @@ -2643,6 +2716,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -2665,6 +2739,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2672,6 +2747,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -2689,6 +2765,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2696,6 +2773,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -2703,6 +2781,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -2720,6 +2799,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2727,6 +2807,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -2782,6 +2863,7 @@ "type": "Integer" } ], + "additionalTags": [], "required": true } ], @@ -2797,6 +2879,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2908,6 +2991,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -2923,6 +3007,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2930,6 +3015,7 @@ "description": "`true` when Chrome's accessibility support is enabled, `false` otherwise.", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -2948,6 +3034,7 @@ "description": "", "collection": false, "type": "Session", + "additionalTags": [], "required": true } ], @@ -2963,6 +3050,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -2971,6 +3059,7 @@ "collection": true, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2979,6 +3068,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -2986,6 +3076,7 @@ "description": "A JSON object of additional data passed from the second instance", "collection": false, "type": "unknown", + "additionalTags": [], "required": true } ], @@ -3000,8 +3091,8 @@ "description": "> Enable apps to automatically update themselves.\n\nProcess: Main\n\n**See also: A detailed guide about how to implement updates in your application.**\n\n`autoUpdater` is an EventEmitter.\n\n### Platform Notices\n\nCurrently, 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.\n\nIn addition, there are some subtle differences on each platform:\n\n### macOS\n\nOn macOS, the `autoUpdater` module is built upon Squirrel.Mac, meaning you don't need any special setup to make it work. For server-side requirements, you can read Server Support. Note that App Transport Security (ATS) applies to all requests made as part of the update process. Apps that need to disable ATS can add the `NSAllowsArbitraryLoads` key to their app's plist.\n\n**Note:** Your application must be signed for automatic updates on macOS. This is a requirement of `Squirrel.Mac`.\n\n### Windows\n\nOn Windows, you have to install your app into a user's machine before you can use the `autoUpdater`, so it is recommended that you use the electron-winstaller, Electron Forge or the grunt-electron-installer package to generate a Windows installer.\n\nWhen using electron-winstaller or Electron Forge make sure you do not try to update your app the first time it runs (Also see this issue for more info). It's also recommended to use electron-squirrel-startup to get desktop shortcuts for your app.\n\nThe installer generated with Squirrel will create a shortcut icon with an Application User Model ID in the format of `com.squirrel.PACKAGE_ID.YOUR_EXE_WITHOUT_DOT_EXE`, examples are `com.squirrel.slack.Slack` and `com.squirrel.code.Code`. You have to use the same ID for your app with `app.setAppUserModelId` API, otherwise Windows will not be able to pin your app properly in task bar.\n\nLike Squirrel.Mac, Windows can host updates on S3 or any other static file host. You can read the documents of Squirrel.Windows to get more details about how Squirrel.Windows works.", "slug": "auto-updater", "websiteUrl": "https://electronjs.org/docs/api/auto-updater", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/auto-updater.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/auto-updater.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -3122,6 +3213,7 @@ "description": "", "collection": false, "type": "Error", + "additionalTags": [], "required": true } ], @@ -3158,6 +3250,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -3166,6 +3259,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -3174,6 +3268,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -3181,6 +3276,7 @@ "description": "", "collection": false, "type": "Date", + "additionalTags": [], "required": true }, { @@ -3189,6 +3285,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -3210,8 +3307,8 @@ "description": "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.\n\n### Class: BrowserView\n\n> Create and control views.\n\nProcess: Main\n\nThis module cannot be used until the `ready` event of the `app` module is emitted.\n\n### Example\n\n```\n// In the main process.\nconst { app, BrowserView, BrowserWindow } = require('electron')\n\napp.whenReady().then(() => {\n const win = new BrowserWindow({ width: 800, height: 600 })\n\n const view = new BrowserView()\n win.setBrowserView(view)\n view.setBounds({ x: 0, y: 0, width: 300, height: 300 })\n view.webContents.loadURL('https://electronjs.org')\n})\n```", "slug": "browser-view", "websiteUrl": "https://electronjs.org/docs/api/browser-view", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/browser-view.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/browser-view.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -3372,8 +3469,8 @@ "description": "> Create and control browser windows.\n\nProcess: Main\n\nThis module cannot be used until the `ready` event of the `app` module is emitted.\n\n### Window customization\n\nThe `BrowserWindow` class exposes various ways to modify the look and behavior of your app's windows. For more details, see the Window Customization tutorial.\n\n### Showing the window gracefully\n\nWhen loading a page in the window directly, users may see the page load incrementally, which is not a good experience for a native app. To make the window display without a visual flash, there are two solutions for different situations.\n\n### Using the `ready-to-show` event\n\nWhile loading the page, the `ready-to-show` event will be emitted when the renderer process has rendered the page for the first time if the window has not been shown yet. Showing the window after this event will have no visual flash:\n\n```\nconst { BrowserWindow } = require('electron')\nconst win = new BrowserWindow({ show: false })\nwin.once('ready-to-show', () => {\n win.show()\n})\n```\n\nThis event is usually emitted after the `did-finish-load` event, but for pages with many remote resources, it may be emitted before the `did-finish-load` event.\n\nPlease note that using this event implies that the renderer will be considered \"visible\" and paint even though `show` is false. This event will never fire if you use `paintWhenInitiallyHidden: false`\n\n### Setting the `backgroundColor` property\n\nFor a complex app, the `ready-to-show` event could be emitted too late, making the app feel slow. In this case, it is recommended to show the window immediately, and use a `backgroundColor` close to your app's background:\n\n```\nconst { BrowserWindow } = require('electron')\n\nconst win = new BrowserWindow({ backgroundColor: '#2e2c29' })\nwin.loadURL('https://github.com')\n```\n\nNote that even for apps that use `ready-to-show` event, it is still recommended to set `backgroundColor` to make the app feel more native.\n\nSome examples of valid `backgroundColor` values include:\n\n```\nconst win = new BrowserWindow()\nwin.setBackgroundColor('hsl(230, 100%, 50%)')\nwin.setBackgroundColor('rgb(255, 145, 145)')\nwin.setBackgroundColor('#ff00a3')\nwin.setBackgroundColor('blueviolet')\n```\n\nFor more information about these color types see valid options in win.setBackgroundColor.\n\n### Parent and child windows\n\nBy using `parent` option, you can create child windows:\n\n```\nconst { BrowserWindow } = require('electron')\n\nconst top = new BrowserWindow()\nconst child = new BrowserWindow({ parent: top })\nchild.show()\ntop.show()\n```\n\nThe `child` window will always show on top of the `top` window.\n\n### Modal windows\n\nA modal window is a child window that disables parent window, to create a modal window, you have to set both `parent` and `modal` options:\n\n```\nconst { BrowserWindow } = require('electron')\n\nconst child = new BrowserWindow({ parent: top, modal: true, show: false })\nchild.loadURL('https://github.com')\nchild.once('ready-to-show', () => {\n child.show()\n})\n```\n\n### Page visibility\n\nThe Page Visibility API works as follows:\n\n* On all platforms, the visibility state tracks whether the window is hidden/minimized or not.\n* Additionally, on macOS, the visibility state also tracks the window occlusion state. If the window is occluded (i.e. fully covered) by another window, the visibility state will be `hidden`. On other platforms, the visibility state will be `hidden` only when the window is minimized or explicitly hidden with `win.hide()`.\n* If a `BrowserWindow` is created with `show: false`, the initial visibility state will be `visible` despite the window actually being hidden.\n* If `backgroundThrottling` is disabled, the visibility state will remain `visible` even if the window is minimized, occluded, or hidden.\n\nIt is recommended that you pause expensive operations when the visibility state is `hidden` in order to minimize power consumption.\n\n### Platform notices\n\n* On macOS modal windows will be displayed as sheets attached to the parent window.\n* On macOS the child windows will keep the relative position to parent window when parent window moves, while on Windows and Linux child windows will not move.\n* On Linux the type of modal windows will be changed to `dialog`.\n* On Linux many desktop environments do not support hiding a modal window.\n\n### Class: BrowserWindow\n\n> Create and control browser windows.\n\nProcess: Main\n\n`BrowserWindow` is an EventEmitter.\n\nIt creates a new `BrowserWindow` with native properties as set by the `options`.", "slug": "browser-window", "websiteUrl": "https://electronjs.org/docs/api/browser-window", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/browser-window.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/browser-window.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -3929,6 +4026,38 @@ } ] }, + { + "name": "backgroundMaterial", + "description": "Set the window's system-drawn background material, including behind the non-client area. Can be `auto`, `none`, `mica`, `acrylic` or `tabbed`. See win.setBackgroundMaterial for more information.", + "required": false, + "additionalTags": [ + "os_windows" + ], + "collection": false, + "type": "String", + "possibleValues": [ + { + "value": "auto", + "description": "" + }, + { + "value": "none", + "description": "" + }, + { + "value": "mica", + "description": "" + }, + { + "value": "acrylic", + "description": "" + }, + { + "value": "tabbed", + "description": "" + } + ] + }, { "name": "zoomToPageWidth", "description": "Controls the behavior on macOS when option-clicking the green stoplight button on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window will grow to the preferred width of the web page when zoomed, `false` will cause it to zoom to the width of the screen. This will also affect the behavior when calling `maximize()` directly. Default is `false`.", @@ -7064,10 +7193,102 @@ ], "urlFragment": "#winsetvibrancytype-macos" }, + { + "name": "setBackgroundMaterial", + "signature": "(material)", + "description": "This method sets the browser window's system-drawn background material, including behind the non-client area.\n\nSee the Windows documentation for more details.\n\n**Note:** This method is only supported on Windows 11 22H2 and up.", + "parameters": [ + { + "name": "material", + "description": "", + "required": true, + "collection": false, + "type": "String", + "possibleValues": [ + { + "value": "auto", + "description": "Let the Desktop Window Manager (DWM) automatically decide the system-drawn backdrop material for this window. This is the default." + }, + { + "value": "none", + "description": "Don't draw any system backdrop." + }, + { + "value": "mica", + "description": "Draw the backdrop material effect corresponding to a long-lived window." + }, + { + "value": "acrylic", + "description": "Draw the backdrop material effect corresponding to a transient window." + }, + { + "value": "tabbed", + "description": "Draw the backdrop material effect corresponding to a window with a tabbed title bar." + } + ] + } + ], + "returns": null, + "additionalTags": [ + "os_windows" + ], + "urlFragment": "#winsetbackgroundmaterialmaterial-windows" + }, + { + "name": "setWindowButtonPosition", + "signature": "(position)", + "description": "Set a custom position for the traffic light buttons in frameless window. Passing `null` will reset the position to default.", + "parameters": [ + { + "name": "position", + "description": "", + "required": true, + "collection": false, + "type": [ + { + "collection": false, + "type": "Point" + }, + { + "type": "null", + "collection": false + } + ] + } + ], + "returns": null, + "additionalTags": [ + "os_macos" + ], + "urlFragment": "#winsetwindowbuttonpositionposition-macos" + }, + { + "name": "getWindowButtonPosition", + "signature": "()", + "description": "The custom position for the traffic light buttons in frameless window, `null` will be returned when there is no custom position.", + "parameters": [], + "returns": { + "collection": false, + "type": [ + { + "collection": false, + "type": "Point" + }, + { + "type": "null", + "collection": false + } + ] + }, + "additionalTags": [ + "os_macos" + ], + "urlFragment": "#wingetwindowbuttonposition-macos" + }, { "name": "setTrafficLightPosition", "signature": "(position)", - "description": "Set a custom position for the traffic light buttons in frameless window.", + "description": "Set a custom position for the traffic light buttons in frameless window. Passing `{ x: 0, y: 0 }` will reset the position to default.\n\n> **Note** This function is deprecated. Use setWindowButtonPosition instead.", "parameters": [ { "name": "position", @@ -7079,23 +7300,25 @@ ], "returns": null, "additionalTags": [ - "os_macos" + "os_macos", + "stability_deprecated" ], - "urlFragment": "#winsettrafficlightpositionposition-macos" + "urlFragment": "#winsettrafficlightpositionposition-macos-deprecated" }, { "name": "getTrafficLightPosition", "signature": "()", - "description": "The custom position for the traffic light buttons in frameless window.", + "description": "The custom position for the traffic light buttons in frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom position.\n\n> **Note** This function is deprecated. Use getWindowButtonPosition instead.", "parameters": [], "returns": { "collection": false, "type": "Point" }, "additionalTags": [ - "os_macos" + "os_macos", + "stability_deprecated" ], - "urlFragment": "#wingettrafficlightposition-macos" + "urlFragment": "#wingettrafficlightposition-macos-deprecated" }, { "name": "setTouchBar", @@ -7536,6 +7759,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7544,6 +7768,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -7551,6 +7776,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -7566,6 +7792,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -7674,6 +7901,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7681,6 +7909,7 @@ "description": "Size the window is being resized to.", "collection": false, "type": "Rectangle", + "additionalTags": [], "required": true }, { @@ -7728,6 +7957,7 @@ ] } ], + "additionalTags": [], "required": true } ], @@ -7763,6 +7993,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7770,6 +8001,7 @@ "description": "Location the window is being moved to.", "collection": false, "type": "Rectangle", + "additionalTags": [], "required": true } ], @@ -7833,6 +8065,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7840,6 +8073,7 @@ "description": "", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -7855,6 +8089,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7863,6 +8098,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -7911,6 +8147,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7919,6 +8156,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -7936,6 +8174,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7943,6 +8182,7 @@ "description": "", "collection": false, "type": "Float", + "additionalTags": [], "required": true } ], @@ -7987,6 +8227,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -7994,6 +8235,7 @@ "description": "The screen coordinates the context menu was triggered at", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -8010,8 +8252,8 @@ "description": "> Make HTTP/HTTPS requests.\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._\n\n`ClientRequest` implements the Writable Stream interface and is therefore an EventEmitter.", "slug": "client-request", "websiteUrl": "https://electronjs.org/docs/api/client-request", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/client-request.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/client-request.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -8068,7 +8310,7 @@ }, { "name": "credentials", - "description": "Can be `include` or `omit`. Whether to send credentials with this request. If set to `include`, credentials from the session associated with the request will be used. If set to `omit`, credentials will not be sent with the request (and the `'login'` event will not be triggered in the event of a 401). This matches the behavior of the fetch option of the same name. If this option is not specified, authentication data from the session will be sent, and cookies will not be sent (unless `useSessionCookies` is set).", + "description": "Can be `include`, `omit` or `same-origin`. Whether to send credentials with this request. If set to `include`, credentials from the session associated with the request will be used. If set to `omit`, credentials will not be sent with the request (and the `'login'` event will not be triggered in the event of a 401). If set to `same-origin`, `origin` must also be specified. This matches the behavior of the fetch option of the same name. If this option is not specified, authentication data from the session will be sent, and cookies will not be sent (unless `useSessionCookies` is set).", "required": false, "additionalTags": [], "collection": false, @@ -8081,6 +8323,10 @@ { "value": "omit", "description": "" + }, + { + "value": "same-origin", + "description": "" } ] }, @@ -8166,6 +8412,49 @@ "collection": false, "type": "String", "possibleValues": null + }, + { + "name": "referrerPolicy", + "description": "can be `\"\"`, `no-referrer`, `no-referrer-when-downgrade`, `origin`, `origin-when-cross-origin`, `unsafe-url`, `same-origin`, `strict-origin`, or `strict-origin-when-cross-origin`. Defaults to `strict-origin-when-cross-origin`.", + "required": false, + "additionalTags": [], + "collection": false, + "type": "String", + "possibleValues": null + }, + { + "name": "cache", + "description": "can be `default`, `no-store`, `reload`, `no-cache`, `force-cache` or `only-if-cached`.", + "required": false, + "additionalTags": [], + "collection": false, + "type": "String", + "possibleValues": [ + { + "value": "default", + "description": "" + }, + { + "value": "no-store", + "description": "" + }, + { + "value": "reload", + "description": "" + }, + { + "value": "no-cache", + "description": "" + }, + { + "value": "force-cache", + "description": "" + }, + { + "value": "only-if-cached", + "description": "" + } + ] } ] }, @@ -8331,7 +8620,10 @@ "returns": null } ], - "returns": null, + "returns": { + "collection": false, + "type": "this" + }, "additionalTags": [], "urlFragment": "#requestendchunk-encoding-callback" }, @@ -8421,6 +8713,7 @@ "description": "An object representing the HTTP response message.", "collection": false, "type": "IncomingMessage", + "additionalTags": [], "required": true } ], @@ -8481,6 +8774,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true }, { @@ -8507,6 +8801,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -8536,6 +8831,7 @@ "description": "an error object providing some information about the failure.", "collection": false, "type": "Error", + "additionalTags": [], "required": true } ], @@ -8558,6 +8854,7 @@ "description": "", "collection": false, "type": "Integer", + "additionalTags": [], "required": true }, { @@ -8566,6 +8863,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -8574,6 +8872,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -8593,6 +8892,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -8607,8 +8907,8 @@ "description": "> Perform copy and paste operations on the system clipboard.\n\nProcess: Main, Renderer (non-sandboxed only)\n\nOn Linux, there is also a `selection` clipboard. To manipulate it you need to pass `selection` to each method:", "slug": "clipboard", "websiteUrl": "https://electronjs.org/docs/api/clipboard", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/clipboard.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/clipboard.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -9273,8 +9573,8 @@ "description": "", "slug": "command-line", "websiteUrl": "https://electronjs.org/docs/api/command-line", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/command-line.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/command-line.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -9400,8 +9700,8 @@ "description": "> Collect tracing data from Chromium to find performance bottlenecks and slow operations.\n\nProcess: Main\n\nThis module does not include a web interface. To view recorded traces, use trace viewer, available at `chrome://tracing` in Chrome.\n\n**Note:** You should not use this module until the `ready` event of the app module is emitted.", "slug": "content-tracing", "websiteUrl": "https://electronjs.org/docs/api/content-tracing", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/content-tracing.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/content-tracing.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -9537,8 +9837,8 @@ "description": "> Create a safe, bi-directional, synchronous bridge across isolated contexts\n\nProcess: Renderer\n\nAn example of exposing an API to a renderer from an isolated preload script is given below:\n\n```\n// Preload (Isolated World)\nconst { contextBridge, ipcRenderer } = require('electron')\n\ncontextBridge.exposeInMainWorld(\n 'electron',\n {\n doThing: () => ipcRenderer.send('do-a-thing')\n }\n)\n```\n\n### Glossary\n\n\n\n### Main World\n\nThe \"Main World\" is the JavaScript context that your main renderer code runs in. By default, the page you load in your renderer executes code in this world.\n\n### Isolated World\n\nWhen `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an \"Isolated World\". You can read more about context isolation and what it affects in the security docs.", "slug": "context-bridge", "websiteUrl": "https://electronjs.org/docs/api/context-bridge", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/context-bridge.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/context-bridge.md", + "version": "25.0.0", "type": "Module", "process": { "main": false, @@ -9613,8 +9913,8 @@ "description": "", "slug": "cookies", "websiteUrl": "https://electronjs.org/docs/api/cookies", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/cookies.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/cookies.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -9901,6 +10201,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -9908,6 +10209,7 @@ "description": "The cookie that was changed.", "collection": false, "type": "Cookie", + "additionalTags": [], "required": true }, { @@ -9937,6 +10239,7 @@ "description": "The cookie was overwritten with an already-expired expiration date." } ], + "additionalTags": [], "required": true }, { @@ -9944,6 +10247,7 @@ "description": "`true` if the cookie was removed, `false` otherwise.", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -9958,8 +10262,8 @@ "description": "> Submit crash reports to a remote server.\n\nProcess: Main, Renderer\n\nThe following is an example of setting up Electron to automatically submit crash reports to a remote server:\n\n```\nconst { crashReporter } = require('electron')\n\ncrashReporter.start({ submitURL: 'https://your-domain.com/url-to-submit' })\n```\n\nFor setting up a server to accept and process crash reports, you can use following projects:\n\n* socorro\n* mini-breakpad-server\n\n> **Note:** Electron uses Crashpad, not Breakpad, to collect and upload crashes, but for the time being, the upload protocol is the same.\n\nOr use a 3rd party hosted solution:\n\n* Backtrace\n* Sentry\n* BugSplat\n* Bugsnag\n\nCrash reports are stored temporarily before being uploaded in a directory underneath the app's user data directory, called 'Crashpad'. You can override this directory by calling `app.setPath('crashDumps', '/path/to/crashes')` before starting the crash reporter.\n\nElectron uses crashpad to monitor and report crashes.", "slug": "crash-reporter", "websiteUrl": "https://electronjs.org/docs/api/crash-reporter", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/crash-reporter.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/crash-reporter.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -10221,8 +10525,8 @@ "description": "", "slug": "debugger", "websiteUrl": "https://electronjs.org/docs/api/debugger", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/debugger.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/debugger.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -10326,6 +10630,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -10334,6 +10639,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -10349,6 +10655,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -10357,6 +10664,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -10364,6 +10672,7 @@ "description": "Event parameters defined by the 'parameters' attribute in the remote debugging protocol.", "collection": false, "type": "any", + "additionalTags": [], "required": true }, { @@ -10372,6 +10681,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -10386,8 +10696,8 @@ "description": "> Access information about media sources that can be used to capture audio and video from the desktop using the `navigator.mediaDevices.getUserMedia` API.\n\nProcess: Main\n\nThe following example shows how to capture video from a desktop window whose title is `Electron`:\n\n```\n// In the main process.\nconst { desktopCapturer } = require('electron')\n\ndesktopCapturer.getSources({ types: ['window', 'screen'] }).then(async sources => {\n for (const source of sources) {\n if (source.name === 'Electron') {\n mainWindow.webContents.send('SET_SOURCE', source.id)\n return\n }\n }\n})\n```\n\n```\n// In the preload script.\nconst { ipcRenderer } = require('electron')\n\nipcRenderer.on('SET_SOURCE', async (event, sourceId) => {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({\n audio: false,\n video: {\n mandatory: {\n chromeMediaSource: 'desktop',\n chromeMediaSourceId: sourceId,\n minWidth: 1280,\n maxWidth: 1280,\n minHeight: 720,\n maxHeight: 720\n }\n }\n })\n handleStream(stream)\n } catch (e) {\n handleError(e)\n }\n})\n\nfunction handleStream (stream) {\n const video = document.querySelector('video')\n video.srcObject = stream\n video.onloadedmetadata = (e) => video.play()\n}\n\nfunction handleError (e) {\n console.log(e)\n}\n```\n\nTo capture video from a source provided by `desktopCapturer` the constraints passed to `navigator.mediaDevices.getUserMedia` must include `chromeMediaSource: 'desktop'`, and `audio: false`.\n\nTo capture both audio and video from the entire desktop the constraints passed to `navigator.mediaDevices.getUserMedia` must include `chromeMediaSource: 'desktop'`, for both `audio` and `video`, but should not include a `chromeMediaSourceId` constraint.", "slug": "desktop-capturer", "websiteUrl": "https://electronjs.org/docs/api/desktop-capturer", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/desktop-capturer.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/desktop-capturer.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -10458,8 +10768,8 @@ "description": "> Display native system dialogs for opening and saving files, alerting, etc.\n\nProcess: Main\n\nAn example of showing a dialog to select multiple files:", "slug": "dialog", "websiteUrl": "https://electronjs.org/docs/api/dialog", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/dialog.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/dialog.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -11129,12 +11439,33 @@ }, { "name": "type", - "description": "Can be `\"none\"`, `\"info\"`, `\"error\"`, `\"question\"` or `\"warning\"`. On Windows, `\"question\"` displays the same icon as `\"info\"`, unless you set an icon using the `\"icon\"` option. On macOS, both `\"warning\"` and `\"error\"` display the same warning icon.", + "description": "Can be `none`, `info`, `error`, `question` or `warning`. On Windows, `question` displays the same icon as `info`, unless you set an icon using the `icon` option. On macOS, both `warning` and `error` display the same warning icon.", "required": false, "additionalTags": [], "collection": false, "type": "String", - "possibleValues": null + "possibleValues": [ + { + "value": "none", + "description": "" + }, + { + "value": "info", + "description": "" + }, + { + "value": "error", + "description": "" + }, + { + "value": "question", + "description": "" + }, + { + "value": "warning", + "description": "" + } + ] }, { "name": "buttons", @@ -11263,12 +11594,33 @@ }, { "name": "type", - "description": "Can be `\"none\"`, `\"info\"`, `\"error\"`, `\"question\"` or `\"warning\"`. On Windows, `\"question\"` displays the same icon as `\"info\"`, unless you set an icon using the `\"icon\"` option. On macOS, both `\"warning\"` and `\"error\"` display the same warning icon.", + "description": "Can be `none`, `info`, `error`, `question` or `warning`. On Windows, `question` displays the same icon as `info`, unless you set an icon using the `icon` option. On macOS, both `warning` and `error` display the same warning icon.", "required": false, "additionalTags": [], "collection": false, "type": "String", - "possibleValues": null + "possibleValues": [ + { + "value": "none", + "description": "" + }, + { + "value": "info", + "description": "" + }, + { + "value": "error", + "description": "" + }, + { + "value": "question", + "description": "" + }, + { + "value": "warning", + "description": "" + } + ] }, { "name": "buttons", @@ -11507,8 +11859,8 @@ "description": "", "slug": "dock", "websiteUrl": "https://electronjs.org/docs/api/dock", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/dock.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/dock.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -11751,8 +12103,8 @@ "description": "", "slug": "download-item", "websiteUrl": "https://electronjs.org/docs/api/download-item", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/download-item.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/download-item.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -12066,6 +12418,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -12083,6 +12436,7 @@ "description": "" } ], + "additionalTags": [], "required": true } ], @@ -12098,6 +12452,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -12119,6 +12474,7 @@ "description": "" } ], + "additionalTags": [], "required": true } ], @@ -12133,8 +12489,8 @@ "description": "> Detect keyboard events when the application does not have keyboard focus.\n\nProcess: Main\n\nThe `globalShortcut` module can register/unregister a global keyboard shortcut with the operating system so that you can customize the operations for various shortcuts.\n\n**Note:** The shortcut is global; it will work even if the app does not have the keyboard focus. This module cannot be used before the `ready` event of the app module is emitted.", "slug": "global-shortcut", "websiteUrl": "https://electronjs.org/docs/api/global-shortcut", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/global-shortcut.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/global-shortcut.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -12253,8 +12609,8 @@ "description": "> In-app purchases on Mac App Store.\n\nProcess: Main", "slug": "in-app-purchase", "websiteUrl": "https://electronjs.org/docs/api/in-app-purchase", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/in-app-purchase.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/in-app-purchase.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -12430,8 +12786,8 @@ "description": "", "slug": "incoming-message", "websiteUrl": "https://electronjs.org/docs/api/incoming-message", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/incoming-message.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/incoming-message.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -12542,6 +12898,7 @@ "description": "A chunk of response body's data.", "collection": false, "type": "Buffer", + "additionalTags": [], "required": true } ], @@ -12577,8 +12934,8 @@ "description": "\n\n### ipcMain\n\n> Communicate asynchronously from the main process to renderer processes.\n\nProcess: Main\n\nThe `ipcMain` module is an Event Emitter. When used in the main process, it handles asynchronous and synchronous messages sent from a renderer process (web page). Messages sent from a renderer will be emitted to this module.\n\nFor usage examples, check out the IPC tutorial.\n\n### Sending messages\n\nIt is also possible to send messages from the main process to the renderer process, see webContents.send for more information.\n\n* When sending a message, the event name is the `channel`.\n* To reply to a synchronous message, you need to set `event.returnValue`.\n* To send an asynchronous message back to the sender, you can use `event.reply(...)`. This helper method will automatically handle messages coming from frames that aren't the main frame (e.g. iframes) whereas `event.sender.send(...)` will always send to the main frame.", "slug": "ipc-main", "websiteUrl": "https://electronjs.org/docs/api/ipc-main", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/ipc-main.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/ipc-main.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -12871,8 +13228,8 @@ "description": "\n\n### ipcRenderer\n\n> Communicate asynchronously from a renderer process to the main process.\n\nProcess: Renderer\n\nThe `ipcRenderer` module is an EventEmitter. It provides a few methods so you can send synchronous and asynchronous messages from the render process (web page) to the main process. You can also receive replies from the main process.\n\nSee IPC tutorial for code examples.", "slug": "ipc-renderer", "websiteUrl": "https://electronjs.org/docs/api/ipc-renderer", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/ipc-renderer.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/ipc-renderer.md", + "version": "25.0.0", "type": "Module", "process": { "main": false, @@ -13203,8 +13560,8 @@ "description": "> Add items to native application menus and context menus.\n\nProcess: Main\n\nSee `Menu` for examples.", "slug": "menu-item", "websiteUrl": "https://electronjs.org/docs/api/menu-item", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/menu-item.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/menu-item.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -14091,8 +14448,8 @@ "description": "\n\n### Class: Menu\n\n> Create native application menus and context menus.\n\nProcess: Main", "slug": "menu", "websiteUrl": "https://electronjs.org/docs/api/menu", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/menu.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/menu.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -14376,6 +14733,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -14391,6 +14749,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -14405,8 +14764,8 @@ "description": "", "slug": "message-channel-main", "websiteUrl": "https://electronjs.org/docs/api/message-channel-main", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/message-channel-main.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/message-channel-main.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -14445,8 +14804,8 @@ "description": "", "slug": "message-port-main", "websiteUrl": "https://electronjs.org/docs/api/message-port-main", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/message-port-main.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/message-port-main.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -14529,6 +14888,7 @@ "type": "MessagePortMain" } ], + "additionalTags": [], "required": true } ], @@ -14550,8 +14910,8 @@ "description": "> Create tray, dock, and application icons using PNG or JPG files.\n\nProcess: Main, Renderer\n\nIn Electron, for the APIs that take images, you can pass either file paths or `NativeImage` instances. An empty image will be used when `null` is passed.\n\nFor example, when creating a tray or setting a window's icon, you can pass an image file path as a `string`:\n\n```\nconst { BrowserWindow, Tray } = require('electron')\n\nconst appIcon = new Tray('/Users/somebody/images/icon.png')\nconst win = new BrowserWindow({ icon: '/Users/somebody/images/window.png' })\nconsole.log(appIcon, win)\n```\n\nOr read the image from the clipboard, which returns a `NativeImage`:\n\n### Supported Formats\n\nCurrently `PNG` and `JPEG` image formats are supported. `PNG` is recommended because of its support for transparency and lossless compression.\n\nOn Windows, you can also load `ICO` icons from file paths. For best visual quality, it is recommended to include at least the following sizes in the:\n\n* Small icon\n * 16x16 (100% DPI scale)\n * 20x20 (125% DPI scale)\n * 24x24 (150% DPI scale)\n * 32x32 (200% DPI scale)\n* Large icon\n * 32x32 (100% DPI scale)\n * 40x40 (125% DPI scale)\n * 48x48 (150% DPI scale)\n * 64x64 (200% DPI scale)\n * 256x256\n\nCheck the _Size requirements_ section in this article.\n\n### High Resolution Image\n\nOn platforms that have high-DPI support such as Apple Retina displays, you can append `@2x` after image's base filename to mark it as a high resolution image.\n\nFor example, if `icon.png` is a normal image that has standard resolution, then `icon@2x.png` will be treated as a high resolution image that has double DPI density.\n\nIf you want to support displays with different DPI densities at the same time, you can put images with different sizes in the same folder and use the filename without DPI suffixes. For example:\n\n```\nimages/\n├── icon.png\n├── icon@2x.png\n└── icon@3x.png\n```\n\n```\nconst { Tray } = require('electron')\nconst appIcon = new Tray('/Users/somebody/images/icon.png')\nconsole.log(appIcon)\n```\n\nThe following suffixes for DPI are also supported:\n\n* `@1x`\n* `@1.25x`\n* `@1.33x`\n* `@1.4x`\n* `@1.5x`\n* `@1.8x`\n* `@2x`\n* `@2.5x`\n* `@3x`\n* `@4x`\n* `@5x`\n\n### Template Image\n\nTemplate images consist of black and an alpha channel. Template images are not intended to be used as standalone images and are usually mixed with other content to create the desired final appearance.\n\nThe most common case is to use template images for a menu bar icon, so it can adapt to both light and dark menu bars.\n\n**Note:** Template image is only supported on macOS.\n\nTo mark an image as a template image, its filename should end with the word `Template`. For example:\n\n* `xxxTemplate.png`\n* `xxxTemplate@2x.png`", "slug": "native-image", "websiteUrl": "https://electronjs.org/docs/api/native-image", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/native-image.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/native-image.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -14796,8 +15156,8 @@ "description": "", "slug": "native-image", "websiteUrl": "https://electronjs.org/docs/api/native-image", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/native-image.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/native-image.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -15205,8 +15565,8 @@ "description": "> Read and respond to changes in Chromium's native color theme.\n\nProcess: Main", "slug": "native-theme", "websiteUrl": "https://electronjs.org/docs/api/native-theme", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/native-theme.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/native-theme.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -15304,8 +15664,8 @@ "description": "> Logging network events for a session.\n\nProcess: Main\n\n```\nconst { netLog } = require('electron')\n\napp.whenReady().then(async () => {\n await netLog.startLogging('/path/to/net-log')\n // After some network events\n const path = await netLog.stopLogging()\n console.log('Net-logs written to', path)\n})\n```\n\nSee `--log-net-log` to log network events throughout the app's lifecycle.\n\n**Note:** All methods unless specified can only be used after the `ready` event of the `app` module gets emitted.", "slug": "net-log", "websiteUrl": "https://electronjs.org/docs/api/net-log", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/net-log.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/net-log.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -15419,8 +15779,8 @@ "description": "> Issue HTTP/HTTPS requests using Chromium's native networking library\n\nProcess: Main\n\nThe `net` module is a client-side API for issuing HTTP(S) requests. It is similar to the HTTP and HTTPS modules of Node.js but uses Chromium's native networking library instead of the Node.js implementation, offering better support for web proxies. It also supports checking network status.\n\nThe following is a non-exhaustive list of why you may consider using the `net` module instead of the native Node.js modules:\n\n* Automatic management of system proxy configuration, support of the wpad protocol and proxy pac configuration files.\n* Automatic tunneling of HTTPS requests.\n* Support for authenticating proxies using basic, digest, NTLM, Kerberos or negotiate authentication schemes.\n* Support for traffic monitoring proxies: Fiddler-like proxies used for access control and monitoring.\n\nThe API components (including classes, methods, properties and event names) are similar to those used in Node.js.\n\nExample usage:\n\n```\nconst { app } = require('electron')\napp.whenReady().then(() => {\n const { net } = require('electron')\n const request = net.request('https://github.com')\n request.on('response', (response) => {\n console.log(`STATUS: ${response.statusCode}`)\n console.log(`HEADERS: ${JSON.stringify(response.headers)}`)\n response.on('data', (chunk) => {\n console.log(`BODY: ${chunk}`)\n })\n response.on('end', () => {\n console.log('No more data in response.')\n })\n })\n request.end()\n})\n```\n\nThe `net` API can be used only after the application emits the `ready` event. Trying to use the module before the `ready` event will throw an error.", "slug": "net", "websiteUrl": "https://electronjs.org/docs/api/net", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/net.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/net.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -15458,6 +15818,49 @@ "additionalTags": [], "urlFragment": "#netrequestoptions" }, + { + "name": "fetch", + "signature": "(input[, init])", + "description": "see Response.\n\nSends a request, similarly to how `fetch()` works in the renderer, using Chrome's network stack. This differs from Node's `fetch()`, which uses Node.js's HTTP stack.\n\nExample:\n\nThis method will issue requests from the default session. To send a `fetch` request from another session, use ses.fetch().\n\nSee the MDN documentation for `fetch()` for more details.\n\nLimitations:\n\n* `net.fetch()` does not support the `data:` or `blob:` schemes.\n* The value of the `integrity` option is ignored.\n* The `.type` and `.url` values of the returned `Response` object are incorrect.\n\nBy default, requests made with `net.fetch` can be made to custom protocols as well as `file:`, and will trigger webRequest handlers if present. When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol handlers will not be called for this request. This allows forwarding an intercepted request to the built-in handler. webRequest handlers will still be triggered when bypassing custom protocols.", + "parameters": [ + { + "name": "input", + "description": "", + "required": true, + "collection": false, + "type": [ + { + "collection": false, + "type": "String", + "possibleValues": null + }, + { + "collection": false, + "type": "GlobalRequest" + } + ] + }, + { + "name": "init", + "description": "", + "required": false, + "collection": false, + "type": "RequestInit" + } + ], + "returns": { + "collection": false, + "type": "Promise", + "innerTypes": [ + { + "collection": false, + "type": "GlobalResponse" + } + ] + }, + "additionalTags": [], + "urlFragment": "#netfetchinput-init" + }, { "name": "isOnline", "signature": "()", @@ -15616,8 +16019,8 @@ "description": "> Create OS desktop notifications\n\nProcess: Main\n\n:::info Renderer process notifications\n\nIf you want to show notifications from a renderer process you should use the web Notifications API\n\n:::\n\n### Class: Notification\n\n> Create OS desktop notifications\n\nProcess: Main\n\n`Notification` is an EventEmitter.\n\nIt creates a new `Notification` with native properties as set by the `options`.\n\n### Static Methods\n\nThe `Notification` class has the following static methods:\n\n### `Notification.isSupported()`\n\nReturns `boolean` - Whether or not desktop notifications are supported on the current system", "slug": "notification", "websiteUrl": "https://electronjs.org/docs/api/notification", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/notification.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/notification.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -15995,6 +16398,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -16010,6 +16414,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -16025,6 +16430,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -16040,6 +16446,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -16048,6 +16455,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -16065,6 +16473,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -16072,6 +16481,7 @@ "description": "The index of the action that was activated.", "collection": false, "type": "number", + "additionalTags": [], "required": true } ], @@ -16089,6 +16499,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -16097,6 +16508,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -16113,8 +16525,8 @@ "description": "> Interface for communication with parent process.\n\nProcess: Utility\n\n`parentPort` is an EventEmitter. _This object is not exported from the `'electron'` module. It is only available as a property of the process object in the Electron API._", "slug": "parent-port", "websiteUrl": "https://electronjs.org/docs/api/parent-port", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/parent-port.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/parent-port.md", + "version": "25.0.0", "type": "Module", "process": { "main": false, @@ -16169,6 +16581,7 @@ "type": "MessagePortMain" } ], + "additionalTags": [], "required": true } ], @@ -16183,8 +16596,8 @@ "description": "> Monitor power state changes.\n\nProcess: Main", "slug": "power-monitor", "websiteUrl": "https://electronjs.org/docs/api/power-monitor", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/power-monitor.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/power-monitor.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -16411,8 +16824,8 @@ "description": "> Block the system from entering low-power (sleep) mode.\n\nProcess: Main\n\nFor example:", "slug": "power-save-blocker", "websiteUrl": "https://electronjs.org/docs/api/power-save-blocker", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/power-save-blocker.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/power-save-blocker.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -16497,8 +16910,8 @@ "description": "> Extensions to process object.\n\nProcess: Main, Renderer\n\nElectron's `process` object is extended from the Node.js `process` object. It adds the following events, properties, and methods:\n\n### Sandbox\n\nIn sandboxed renderers the `process` object contains only a subset of the APIs:\n\n* `crash()`\n* `hang()`\n* `getCreationTime()`\n* `getHeapStatistics()`\n* `getBlinkMemoryInfo()`\n* `getProcessMemoryInfo()`\n* `getSystemMemoryInfo()`\n* `getSystemVersion()`\n* `getCPUUsage()`\n* `getIOCounters()`\n* `uptime()`\n* `argv`\n* `execPath`\n* `env`\n* `pid`\n* `arch`\n* `platform`\n* `sandboxed`\n* `contextIsolated`\n* `type`\n* `version`\n* `versions`\n* `mas`\n* `windowsStore`\n* `contextId`", "slug": "process", "websiteUrl": "https://electronjs.org/docs/api/process", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/process.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/process.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -16816,7 +17229,7 @@ "properties": [ { "name": "defaultApp", - "description": "A `boolean`. When app is started by being passed as parameter to the default app, this property is `true` in the main process, otherwise it is `undefined`.", + "description": "A `boolean`. When the app is started by being passed as parameter to the default Electron executable, this property is `true` in the main process, otherwise it is `undefined`. For example when running the app with `electron .`, it is `true`, even if the app is packaged (`isPackaged`) is `true`. This can be useful to determine how many arguments will need to be sliced off from `process.argv`.", "required": true, "additionalTags": [ "availability_readonly" @@ -17025,11 +17438,11 @@ }, { "name": "protocol", - "description": "> Register a custom protocol and intercept existing protocol requests.\n\nProcess: Main\n\nAn example of implementing a protocol that has the same effect as the `file://` protocol:\n\n```\nconst { app, protocol } = require('electron')\nconst path = require('path')\nconst url = require('url')\n\napp.whenReady().then(() => {\n protocol.registerFileProtocol('atom', (request, callback) => {\n const filePath = url.fileURLToPath('file://' + request.url.slice('atom://'.length))\n callback(filePath)\n })\n})\n```\n\n**Note:** All methods unless specified can only be used after the `ready` event of the `app` module gets emitted.\n\n### Using `protocol` with a custom `partition` or `session`\n\nA protocol is registered to a specific Electron `session` object. If you don't specify a session, then your `protocol` will be applied to the default session that Electron uses. However, if you define a `partition` or `session` on your `browserWindow`'s `webPreferences`, then that window will use a different session and your custom protocol will not work if you just use `electron.protocol.XXX`.\n\nTo have your custom protocol work in combination with a custom session, you need to register it to that session explicitly.\n\n```\nconst { session, app, protocol } = require('electron')\nconst path = require('path')\n\napp.whenReady().then(() => {\n const partition = 'persist:example'\n const ses = session.fromPartition(partition)\n\n ses.protocol.registerFileProtocol('atom', (request, callback) => {\n const url = request.url.substr(7)\n callback({ path: path.normalize(`${__dirname}/${url}`) })\n })\n\n mainWindow = new BrowserWindow({ webPreferences: { partition } })\n})\n```", + "description": "> Register a custom protocol and intercept existing protocol requests.\n\nProcess: Main\n\nAn example of implementing a protocol that has the same effect as the `file://` protocol:\n\n```\nconst { app, protocol, net } = require('electron')\n\napp.whenReady().then(() => {\n protocol.handle('atom', (request) =>\n net.fetch('file://' + request.url.slice('atom://'.length)))\n})\n```\n\n**Note:** All methods unless specified can only be used after the `ready` event of the `app` module gets emitted.\n\n### Using `protocol` with a custom `partition` or `session`\n\nA protocol is registered to a specific Electron `session` object. If you don't specify a session, then your `protocol` will be applied to the default session that Electron uses. However, if you define a `partition` or `session` on your `browserWindow`'s `webPreferences`, then that window will use a different session and your custom protocol will not work if you just use `electron.protocol.XXX`.\n\nTo have your custom protocol work in combination with a custom session, you need to register it to that session explicitly.\n\n```\nconst { session, app, protocol } = require('electron')\nconst path = require('path')\nconst url = require('url')\n\napp.whenReady().then(() => {\n const partition = 'persist:example'\n const ses = session.fromPartition(partition)\n\n ses.protocol.handle('atom', (request) => {\n const path = request.url.slice('atom://'.length)\n return net.fetch(url.pathToFileURL(path.join(__dirname, path)))\n })\n\n mainWindow = new BrowserWindow({ webPreferences: { partition } })\n})\n```", "slug": "protocol", "websiteUrl": "https://electronjs.org/docs/api/protocol", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/protocol.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/protocol.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -17054,6 +17467,98 @@ "additionalTags": [], "urlFragment": "#protocolregisterschemesasprivilegedcustomschemes" }, + { + "name": "handle", + "signature": "(scheme, handler)", + "description": "Register a protocol handler for `scheme`. Requests made to URLs with this scheme will delegate to this handler to determine what response should be sent.\n\nEither a `Response` or a `Promise` can be returned.\n\nExample:\n\nSee the MDN docs for `Request` and `Response` for more details.", + "parameters": [ + { + "name": "scheme", + "description": "scheme to handle, for example `https` or `my-app`. This is the bit before the `:` in a URL.", + "required": true, + "collection": false, + "type": "String", + "possibleValues": null + }, + { + "name": "handler", + "description": "", + "required": true, + "collection": false, + "type": "Function", + "parameters": [ + { + "name": "request", + "description": "", + "required": true, + "collection": false, + "type": "GlobalRequest" + } + ], + "returns": { + "collection": false, + "type": [ + { + "collection": false, + "type": "GlobalResponse" + }, + { + "collection": false, + "type": "Promise", + "innerTypes": [ + { + "collection": false, + "type": "GlobalResponse" + } + ] + } + ] + } + } + ], + "returns": null, + "additionalTags": [], + "urlFragment": "#protocolhandlescheme-handler" + }, + { + "name": "unhandle", + "signature": "(scheme)", + "description": "Removes a protocol handler registered with `protocol.handle`.", + "parameters": [ + { + "name": "scheme", + "description": "scheme for which to remove the handler.", + "required": true, + "collection": false, + "type": "String", + "possibleValues": null + } + ], + "returns": null, + "additionalTags": [], + "urlFragment": "#protocolunhandlescheme" + }, + { + "name": "isProtocolHandled", + "signature": "(scheme)", + "description": "Whether `scheme` is already handled.", + "parameters": [ + { + "name": "scheme", + "description": "", + "required": true, + "collection": false, + "type": "String", + "possibleValues": null + } + ], + "returns": { + "collection": false, + "type": "boolean" + }, + "additionalTags": [], + "urlFragment": "#protocolisprotocolhandledscheme" + }, { "name": "registerFileProtocol", "signature": "(scheme, handler)", @@ -17116,8 +17621,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolregisterfileprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolregisterfileprotocolscheme-handler-deprecated" }, { "name": "registerBufferProtocol", @@ -17180,8 +17687,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolregisterbufferprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolregisterbufferprotocolscheme-handler-deprecated" }, { "name": "registerStringProtocol", @@ -17245,8 +17754,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolregisterstringprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolregisterstringprotocolscheme-handler-deprecated" }, { "name": "registerHttpProtocol", @@ -17300,8 +17811,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolregisterhttpprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolregisterhttpprotocolscheme-handler-deprecated" }, { "name": "registerStreamProtocol", @@ -17364,8 +17877,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolregisterstreamprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolregisterstreamprotocolscheme-handler-deprecated" }, { "name": "unregisterProtocol", @@ -17385,8 +17900,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolunregisterprotocolscheme" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolunregisterprotocolscheme-deprecated" }, { "name": "isProtocolRegistered", @@ -17406,8 +17923,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolisprotocolregisteredscheme" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolisprotocolregisteredscheme-deprecated" }, { "name": "interceptFileProtocol", @@ -17471,8 +17990,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolinterceptfileprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolinterceptfileprotocolscheme-handler-deprecated" }, { "name": "interceptStringProtocol", @@ -17536,8 +18057,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolinterceptstringprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolinterceptstringprotocolscheme-handler-deprecated" }, { "name": "interceptBufferProtocol", @@ -17600,8 +18123,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolinterceptbufferprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolinterceptbufferprotocolscheme-handler-deprecated" }, { "name": "interceptHttpProtocol", @@ -17655,8 +18180,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolintercepthttpprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolintercepthttpprotocolscheme-handler-deprecated" }, { "name": "interceptStreamProtocol", @@ -17719,8 +18246,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolinterceptstreamprotocolscheme-handler" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolinterceptstreamprotocolscheme-handler-deprecated" }, { "name": "uninterceptProtocol", @@ -17740,8 +18269,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocoluninterceptprotocolscheme" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocoluninterceptprotocolscheme-deprecated" }, { "name": "isProtocolIntercepted", @@ -17761,8 +18292,10 @@ "collection": false, "type": "boolean" }, - "additionalTags": [], - "urlFragment": "#protocolisprotocolinterceptedscheme" + "additionalTags": [ + "stability_deprecated" + ], + "urlFragment": "#protocolisprotocolinterceptedscheme-deprecated" } ], "properties": [], @@ -17774,8 +18307,8 @@ "description": "Process: Main\n\n> Register for and receive notifications from remote push notification services\n\nFor example, when registering for push notifications via Apple push notification services (APNS):", "slug": "push-notifications", "websiteUrl": "https://electronjs.org/docs/api/push-notifications", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/push-notifications.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/push-notifications.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -17827,6 +18360,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -17845,6 +18379,7 @@ "type": "any" } ], + "additionalTags": [], "required": true } ], @@ -17861,8 +18396,8 @@ "description": "> Allows access to simple encryption and decryption of strings for storage on the local machine.\n\nProcess: Main\n\nThis module protects data stored on disk from being accessed by other applications or users with full disk access.\n\nNote that on Mac, access to the system Keychain is required and these calls can block the current thread to collect user input. The same is true for Linux, if a password management tool is available.", "slug": "safe-storage", "websiteUrl": "https://electronjs.org/docs/api/safe-storage", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/safe-storage.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/safe-storage.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -17934,8 +18469,8 @@ "description": "> Retrieve information about screen size, displays, cursor position, etc.\n\nProcess: Main\n\nThis module cannot be used until the `ready` event of the `app` module is emitted.\n\n`screen` is an EventEmitter.\n\n**Note:** In the renderer / DevTools, `window.screen` is a reserved DOM property, so writing `let { screen } = require('electron')` will not work.\n\nAn example of creating a window that fills the whole screen:\n\n```\nconst { app, BrowserWindow, screen } = require('electron')\n\nlet win\napp.whenReady().then(() => {\n const { width, height } = screen.getPrimaryDisplay().workAreaSize\n win = new BrowserWindow({ width, height })\n win.loadURL('https://github.com')\n})\n```\n\nAnother example of creating a window in the external display:", "slug": "screen", "websiteUrl": "https://electronjs.org/docs/api/screen", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/screen.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/screen.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -18151,6 +18686,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -18158,6 +18694,7 @@ "description": "", "collection": false, "type": "Display", + "additionalTags": [], "required": true } ], @@ -18173,6 +18710,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -18180,6 +18718,7 @@ "description": "", "collection": false, "type": "Display", + "additionalTags": [], "required": true } ], @@ -18195,6 +18734,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -18202,6 +18742,7 @@ "description": "", "collection": false, "type": "Display", + "additionalTags": [], "required": true }, { @@ -18210,6 +18751,7 @@ "collection": true, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -18224,8 +18766,8 @@ "description": "", "slug": "service-workers", "websiteUrl": "https://electronjs.org/docs/api/service-workers", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/service-workers.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/service-workers.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -18290,6 +18832,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -18403,6 +18946,7 @@ "type": "number" } ], + "additionalTags": [], "required": true } ], @@ -18418,6 +18962,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -18436,6 +18981,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -18450,8 +18996,8 @@ "description": "> Manage browser sessions, cookies, cache, proxy settings, etc.\n\nProcess: Main\n\nThe `session` module can be used to create new `Session` objects.\n\nYou can also access the `session` of existing pages by using the `session` property of `WebContents`, or from the `session` module.", "slug": "session", "websiteUrl": "https://electronjs.org/docs/api/session", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/session.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/session.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -18496,6 +19042,44 @@ }, "additionalTags": [], "urlFragment": "#sessionfrompartitionpartition-options" + }, + { + "name": "fromPath", + "signature": "(path[, options])", + "description": "A session instance from the absolute path as specified by the `path` string. When there is an existing `Session` with the same absolute path, it will be returned; otherwise a new `Session` instance will be created with `options`. The call will throw an error if the path is not an absolute path. Additionally, an error will be thrown if an empty string is provided.\n\nTo create a `Session` with `options`, you have to ensure the `Session` with the `path` has never been used before. There is no way to change the `options` of an existing `Session` object.", + "parameters": [ + { + "name": "path", + "description": "", + "required": true, + "collection": false, + "type": "String", + "possibleValues": null + }, + { + "name": "options", + "description": "", + "required": false, + "collection": false, + "type": "Object", + "properties": [ + { + "name": "cache", + "description": "Whether to enable cache.", + "required": true, + "additionalTags": [], + "collection": false, + "type": "boolean" + } + ] + } + ], + "returns": { + "collection": false, + "type": "Session" + }, + "additionalTags": [], + "urlFragment": "#sessionfrompathpath-options" } ], "properties": [ @@ -18517,8 +19101,8 @@ "description": "", "slug": "session", "websiteUrl": "https://electronjs.org/docs/api/session", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/session.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/session.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -19006,6 +19590,49 @@ "additionalTags": [], "urlFragment": "#sescloseallconnections" }, + { + "name": "fetch", + "signature": "(input[, init])", + "description": "see Response.\n\nSends a request, similarly to how `fetch()` works in the renderer, using Chrome's network stack. This differs from Node's `fetch()`, which uses Node.js's HTTP stack.\n\nExample:\n\nSee also `net.fetch()`, a convenience method which issues requests from the default session.\n\nSee the MDN documentation for `fetch()` for more details.\n\nLimitations:\n\n* `net.fetch()` does not support the `data:` or `blob:` schemes.\n* The value of the `integrity` option is ignored.\n* The `.type` and `.url` values of the returned `Response` object are incorrect.\n\nBy default, requests made with `net.fetch` can be made to custom protocols as well as `file:`, and will trigger webRequest handlers if present. When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol handlers will not be called for this request. This allows forwarding an intercepted request to the built-in handler. webRequest handlers will still be triggered when bypassing custom protocols.", + "parameters": [ + { + "name": "input", + "description": "", + "required": true, + "collection": false, + "type": [ + { + "collection": false, + "type": "String", + "possibleValues": null + }, + { + "collection": false, + "type": "GlobalRequest" + } + ] + }, + { + "name": "init", + "description": "", + "required": false, + "collection": false, + "type": "RequestInit" + } + ], + "returns": { + "collection": false, + "type": "Promise", + "innerTypes": [ + { + "collection": false, + "type": "GlobalResponse" + } + ] + }, + "additionalTags": [], + "urlFragment": "#sesfetchinput-init" + }, { "name": "disableNetworkEmulation", "signature": "()", @@ -20562,6 +21189,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20569,6 +21197,7 @@ "description": "", "collection": false, "type": "DownloadItem", + "additionalTags": [], "required": true }, { @@ -20576,6 +21205,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -20591,6 +21221,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20598,6 +21229,7 @@ "description": "", "collection": false, "type": "Extension", + "additionalTags": [], "required": true } ], @@ -20613,6 +21245,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20620,6 +21253,7 @@ "description": "", "collection": false, "type": "Extension", + "additionalTags": [], "required": true } ], @@ -20635,6 +21269,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20642,6 +21277,7 @@ "description": "", "collection": false, "type": "Extension", + "additionalTags": [], "required": true } ], @@ -20657,6 +21293,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20665,6 +21302,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true }, { @@ -20672,6 +21310,7 @@ "description": "True if the renderer is requesting that the connection include credentials (see the spec for more details.)", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -20687,6 +21326,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20695,6 +21335,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -20710,6 +21351,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20718,6 +21360,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -20733,6 +21376,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20741,6 +21385,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -20756,6 +21401,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20764,6 +21410,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -20779,6 +21426,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20804,6 +21452,7 @@ "type": "WebFrameMain" } ], + "additionalTags": [], "required": true }, { @@ -20831,6 +21480,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -20846,6 +21496,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20871,6 +21522,7 @@ "type": "WebFrameMain" } ], + "additionalTags": [], "required": true } ], @@ -20886,6 +21538,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20911,6 +21564,7 @@ "type": "WebFrameMain" } ], + "additionalTags": [], "required": true } ], @@ -20926,6 +21580,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20952,6 +21607,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -20967,6 +21623,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -20974,6 +21631,7 @@ "description": "", "collection": true, "type": "SerialPort", + "additionalTags": [], "required": true }, { @@ -20981,6 +21639,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true }, { @@ -20999,6 +21658,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -21014,6 +21674,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -21021,6 +21682,7 @@ "description": "", "collection": false, "type": "SerialPort", + "additionalTags": [], "required": true }, { @@ -21028,6 +21690,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -21043,6 +21706,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -21050,6 +21714,7 @@ "description": "", "collection": false, "type": "SerialPort", + "additionalTags": [], "required": true }, { @@ -21057,6 +21722,7 @@ "description": "", "collection": false, "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -21072,6 +21738,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -21106,6 +21773,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -21121,6 +21789,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -21146,6 +21815,7 @@ "type": "WebFrameMain" } ], + "additionalTags": [], "required": true }, { @@ -21164,6 +21834,7 @@ } ], "returns": null, + "additionalTags": [], "required": true } ], @@ -21179,31 +21850,23 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { - "name": "details", + "name": "device", "description": "", "collection": false, - "type": "Object", - "properties": [ - { - "name": "device", - "description": "", - "required": true, - "additionalTags": [], - "collection": false, - "type": "USBDevice" - }, - { - "name": "frame", - "description": "", - "required": true, - "additionalTags": [], - "collection": false, - "type": "WebFrameMain" - } - ], + "type": "USBDevice", + "additionalTags": [], + "required": true + }, + { + "name": "webContents", + "description": "", + "collection": false, + "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -21219,31 +21882,23 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { - "name": "details", + "name": "device", "description": "", "collection": false, - "type": "Object", - "properties": [ - { - "name": "device", - "description": "", - "required": true, - "additionalTags": [], - "collection": false, - "type": "USBDevice" - }, - { - "name": "frame", - "description": "", - "required": true, - "additionalTags": [], - "collection": false, - "type": "WebFrameMain" - } - ], + "type": "USBDevice", + "additionalTags": [], + "required": true + }, + { + "name": "webContents", + "description": "", + "collection": false, + "type": "WebContents", + "additionalTags": [], "required": true } ], @@ -21259,6 +21914,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -21272,7 +21928,7 @@ "description": "", "required": true, "additionalTags": [], - "collection": true, + "collection": false, "type": "USBDevice" }, { @@ -21285,6 +21941,7 @@ "possibleValues": null } ], + "additionalTags": [], "required": true } ], @@ -21299,8 +21956,8 @@ "description": "The `ShareMenu` class creates Share Menu on macOS, which can be used to share information from the current context to apps, social media accounts, and other services.\n\nFor including the share menu as a submenu of other menus, please use the `shareMenu` role of `MenuItem`.\n\n### Class: ShareMenu\n\n> Create share menu on macOS.\n\nProcess: Main", "slug": "share-menu", "websiteUrl": "https://electronjs.org/docs/api/share-menu", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/share-menu.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/share-menu.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -21366,8 +22023,8 @@ "description": "> Manage files and URLs using their default applications.\n\nProcess: Main, Renderer (non-sandboxed only)\n\nThe `shell` module provides functions related to desktop integration.\n\nAn example of opening a URL in the user's default browser:\n\n```\nconst { shell } = require('electron')\n\nshell.openExternal('https://github.com')\n```\n\n**Note:** While the `shell` module can be used in the renderer process, it will not function in a sandboxed renderer.", "slug": "shell", "websiteUrl": "https://electronjs.org/docs/api/shell", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/shell.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/shell.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -21608,8 +22265,8 @@ "description": "> Get system preferences.\n\nProcess: Main", "slug": "system-preferences", "websiteUrl": "https://electronjs.org/docs/api/system-preferences", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/system-preferences.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/system-preferences.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -22943,6 +23600,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -22951,6 +23609,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -22968,6 +23627,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true } ], @@ -22985,6 +23645,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -22992,6 +23653,7 @@ "description": "`true` if an inverted color scheme (a high contrast color scheme with light text and dark backgrounds) is being used, `false` otherwise.", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -23010,6 +23672,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -23017,6 +23680,7 @@ "description": "`true` if a high contrast theme is being used, `false` otherwise.", "collection": false, "type": "boolean", + "additionalTags": [], "required": true } ], @@ -23034,8 +23698,8 @@ "description": "> Create a button in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-button", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-button", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-button.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-button.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23225,8 +23889,8 @@ "description": "> Create a color picker in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-color-picker", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-color-picker", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-color-picker.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-color-picker.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23317,8 +23981,8 @@ "description": "> Create a group in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-group", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-group", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-group.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-group.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23359,8 +24023,8 @@ "description": "> Create a label in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-label", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-label", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-label.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-label.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23451,8 +24115,8 @@ "description": "> Instantiates a special \"other items proxy\", which nests TouchBar elements inherited from Chromium at the space indicated by the proxy. By default, this proxy is added to each TouchBar at the end of the input. For more information, see the AppKit docs on NSTouchBarItemIdentifierOtherItemsProxy\n\nNote: Only one instance of this class can be added per TouchBar.\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-other-items-proxy", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-other-items-proxy", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-other-items-proxy.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-other-items-proxy.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23475,8 +24139,8 @@ "description": "> Create a popover in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-popover", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-popover", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-popover.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-popover.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23562,8 +24226,8 @@ "description": "> Create a scrubber (a scrollable selector)\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-scrubber", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-scrubber", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-scrubber.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-scrubber.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -23811,8 +24475,8 @@ "description": "> Create a segmented control (a button group) where one button has a selected state\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-segmented-control", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-segmented-control", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-segmented-control.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-segmented-control.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -24002,8 +24666,8 @@ "description": "> Create a slider in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-slider", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-slider", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-slider.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-slider.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -24125,8 +24789,8 @@ "description": "> Create a spacer between two items in the touch bar for native macOS applications\n\nProcess: Main
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._", "slug": "touch-bar-spacer", "websiteUrl": "https://electronjs.org/docs/api/touch-bar-spacer", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar-spacer.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar-spacer.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -24205,8 +24869,8 @@ "description": "\n\n### Class: TouchBar\n\n> Create TouchBar layouts for native macOS applications\n\nProcess: Main", "slug": "touch-bar", "websiteUrl": "https://electronjs.org/docs/api/touch-bar", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/touch-bar.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/touch-bar.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -24434,8 +25098,8 @@ "description": "\n\n### Class: Tray\n\n> Add icons and context menus to the system's notification area.\n\nProcess: Main\n\n`Tray` is an EventEmitter.\n\n```\nconst { app, Menu, Tray } = require('electron')\n\nlet tray = null\napp.whenReady().then(() => {\n tray = new Tray('/path/to/my/icon')\n const contextMenu = Menu.buildFromTemplate([\n { label: 'Item1', type: 'radio' },\n { label: 'Item2', type: 'radio' },\n { label: 'Item3', type: 'radio', checked: true },\n { label: 'Item4', type: 'radio' }\n ])\n tray.setToolTip('This is my application.')\n tray.setContextMenu(contextMenu)\n})\n```\n\n**Platform Considerations**\n\n**Linux**\n\n* Tray icon uses StatusNotifierItem by default, when it is not available in user's desktop environment the `GtkStatusIcon` will be used instead.\n* The `click` event is emitted when the tray icon receives activation from user, however the StatusNotifierItem spec does not specify which action would cause an activation, for some environments it is left mouse click, but for some it might be double left mouse click.\n* In order for changes made to individual `MenuItem`s to take effect, you have to call `setContextMenu` again. For example:\n\n```\nconst { app, Menu, Tray } = require('electron')\n\nlet appIcon = null\napp.whenReady().then(() => {\n appIcon = new Tray('/path/to/my/icon')\n const contextMenu = Menu.buildFromTemplate([\n { label: 'Item1', type: 'radio' },\n { label: 'Item2', type: 'radio' }\n ])\n\n // Make a change to the context menu\n contextMenu.items[1].checked = false\n\n // Call this again for Linux because we modified the context menu\n appIcon.setContextMenu(contextMenu)\n})\n```\n\n**MacOS**\n\n* Icons passed to the Tray constructor should be Template Images.\n* To make sure your icon isn't grainy on retina monitors, be sure your `@2x` image is 144dpi.\n* If you are bundling your application (e.g., with webpack for development), be sure that the file names are not being mangled or hashed. The filename needs to end in Template, and the `@2x` image needs to have the same filename as the standard image, or MacOS will not magically invert your image's colors or use the high density image.\n* 16x16 (72dpi) and 32x32@2x (144dpi) work well for most icons.\n\n**Windows**\n\n* It is recommended to use `ICO` icons to get best visual effects.", "slug": "tray", "websiteUrl": "https://electronjs.org/docs/api/tray", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/tray.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/tray.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -24890,6 +25554,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -24897,6 +25562,7 @@ "description": "The bounds of tray icon.", "collection": false, "type": "Rectangle", + "additionalTags": [], "required": true }, { @@ -24904,6 +25570,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -24919,6 +25586,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -24926,6 +25594,7 @@ "description": "The bounds of tray icon.", "collection": false, "type": "Rectangle", + "additionalTags": [], "required": true } ], @@ -24944,6 +25613,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -24951,6 +25621,7 @@ "description": "The bounds of tray icon.", "collection": false, "type": "Rectangle", + "additionalTags": [], "required": true } ], @@ -25005,6 +25676,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -25013,6 +25685,7 @@ "collection": true, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -25030,6 +25703,7 @@ "description": "", "collection": false, "type": "Event", + "additionalTags": [], "required": true }, { @@ -25038,6 +25712,7 @@ "collection": false, "type": "String", "possibleValues": null, + "additionalTags": [], "required": true } ], @@ -25082,6 +25757,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -25089,6 +25765,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -25106,6 +25783,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -25113,6 +25791,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -25130,6 +25809,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -25137,6 +25817,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -25154,6 +25835,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -25161,6 +25843,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -25178,6 +25861,7 @@ "description": "", "collection": false, "type": "KeyboardEvent", + "additionalTags": [], "required": true }, { @@ -25185,6 +25869,7 @@ "description": "The position of the event.", "collection": false, "type": "Point", + "additionalTags": [], "required": true } ], @@ -25202,8 +25887,8 @@ "description": "`utilityProcess` creates a child process with Node.js and Message ports enabled. It provides the equivalent of `child_process.fork` API from Node.js but instead uses Services API from Chromium to launch the child process.\n\nProcess: Main
", "slug": "utility-process", "websiteUrl": "https://electronjs.org/docs/api/utility-process", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/utility-process.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/utility-process.md", + "version": "25.0.0", "type": "Module", "process": { "main": true, @@ -25337,8 +26022,8 @@ "description": "", "slug": "utility-process", "websiteUrl": "https://electronjs.org/docs/api/utility-process", - "repoUrl": "https://github.com/electron/electron/blob/v24.3.1/docs/api/utility-process.md", - "version": "24.3.1", + "repoUrl": "https://github.com/electron/electron/blob/v25.0.0/docs/api/utility-process.md", + "version": "25.0.0", "type": "Class", "process": { "main": true, @@ -25459,6 +26144,7 @@ "description": "Contains the exit code for the process obtained from waitpid on posix, or GetExitCodeProcess on windows.", "collection": false, "type": "number", + "additionalTags": [], "required": true } ], @@ -25474,6 +26160,7 @@ "description": "", "collection": false, "type": "any", + "additionalTags": [], "required": true } ], @@ -25485,11 +26172,11 @@ }, { "name": "webContents", - "description": "> Render and control web pages.\n\nProcess: Main\n\n`webContents` is an EventEmitter. It is responsible for rendering and controlling a web page and is a property of the `BrowserWindow` object. An example of accessing the `webContents` object:", + "description": "> Render and control web pages.\n\nProcess: Main\n\n`webContents` is an EventEmitter. It is responsible for rendering and controlling a web page and is a property of the `BrowserWindow` object. An example of accessing the `webContents` object:\n\n### Navigation Events\n\nSeveral events can be used to monitor navigations as they occur within a `webContents`.\n\n### Document Navigations\n\nWhen a `webContents` navigates to another page (as opposed to an in-page navigation), the following events will be fired.\n\n* `did-start-navigation`\n* `will-frame-navigate`\n* `will-navigate` (only fired when main frame navigates)\n* `will-redirect` (only fired when a redirect happens during navigation)\n* `did-redirect-navigation` (only fired when a redirect happens during navigation)\n* `did-frame-navigate`\n* `did-navigate` (only fired when main frame navigates)\n\nSubsequent events will not fire if `event.preventDefault()` is called on any of the cancellable events.\n\n### In-page Navigation\n\nIn-page navigations don't cause the page to reload, but instead navigate to a location within the current page. These events are not cancellable. For an in-page navigations, the following events will fire in this order:\n\n* `did-start-navigation`\n* `did-navigate-in-page`\n\n### Frame Navigation\n\nThe `will-navigate` and `did-navigate` events only fire when the mainFrame navigates. If you want to also observe navigations in `