## 1. Project Overview & Quickstart (electron/LICENSE)

# LICENSE

Open-source repository electron/LICENSE

### Repository Details
- **Repository:** [electron/LICENSE](https://github.com/electron/LICENSE)
- **Primary Language:** Code

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (electron/website)

## File: README.md

# electronjs.org

[](https://github.com/electron/website/actions/workflows/push-main.yml)
[](https://github.com/electron/website/actions/workflows/update-i18n-deploy.yml)
[](https://crowdin.com/project/electron)

This repository contains the code for the [Electron](https://www.electronjs.org/) website.
It is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installation

The website currently builds using Node.js 22. If you're using `nvm`, you can set the correct
version of Node.js with `nvm use`.

To get started with a local version of the website, install dependencies with `yarn`. To get the
website running in dev mode, run `yarn start`. To get a production build of the website, run
`yarn build`.

```console
yarn
yarn start
```

## How to modify the documentation

### English docs

For English documentation, the documentation is mirrored from the [electron/electron][] repo.
Changes are picked automatically by the [electron/electron-website-updater][] webhook as soon as they
are made in the latest stable release branch.

For example, if the latest Electron stable release is `v22.0.3`, then any documentation changes in
the `22-x-y` branch in electron/electron will be mirrored into the `main` branch of this repository.

### Translations

This project uses [Crowdin][] to manage localizations. For more information on contributing to
translations, see the [i18n.md][] document.

## How to add a new blog post

To add a new blog post, you need to create a new Markdown file under the `/blog` folder. Supported
frontmatter options are listed in the [Docusaurus Blog docs](https://docusaurus.io/docs/blog#adding-posts).

## Local development

If you want to modify Electron's documentation locally and preview how it looks on the website, you can
tell the `pre-build` script to pull the docs from your local Electron repo.

```console
yarn pre-build ../relative/path/to/local/electron/repo
yarn start
```

## Search indexing

The search functionality on electronjs.org is powered by [Algolia DocSearch](https://docsearch.algolia.com/). DocSearch is a program run by Algolia that offers free
documentation search for open source projects.

If you are a maintainer with an @electronjs.org email, please message [@erickzhao](https://github.com/erickzhao)
to be added to the Algolia project.

## Repository content organization

This repository contains the code for two related things:

- The code to generate the contents of https://electronjs.org
- [`create-electron-documentation`][ced] package

The content of this repository is organized as follows:

```text
└─ root
    |
    ├─ .github/workflows → The definitions for the GitHub actions
    |
    |- blog -> Source files for electronjs.org/blog
    |
    ├─ create-electron-documentation → Code for the npm package
    |        of the same name. Read the readme in the folder
    |        for more information.
    |
    |- docs -> Mirrored docs from electron/electron
    |
    ├─ scripts → The code for the package.json tasks and GitHub
    |        actions
    |
    ├─ src → Docusaurus code
    |
    ├─ static → Docusaurus static assets
```

[ced]: https://npmjs.com/package/create-electron-documentation
[crowdin]: https://crowdin.com/project/electron
[electron/electron]: https://github.com/electron/electron/tree/main/docs
[electron/electron-website-updater]: https://github.com/electron/electron-website-updater
[i18n.md]: ./i18n.md

---

## File: create-electron-documentation/readme.md

# `create-electron-documentation`

The goal of this package is to help developers create the scaffolding
for [Electron] examples faster.

## How to use it?

Electron's documentation is under the `/docs` folder of the [main repo].
You will have to clone it locally and call the following script from one
of the folders under `/docs` (e.g.: [`/docs/tutorial`][tutorials]):

```console
npm create electron-documentation
```

The script will prompt you to enter the documentation page title and description:

```console
> npm create electron-documentation
> Title:
> my-new-doc-page
> Description:
> A description for my new doc page
```

Once executed, the following files will be created:

- A markdown file `the-provided-title.md` in the folder you invoked the script
- A new folder under `/docs/fiddles/the-provided-title` with a minimum [fiddle]
  example for your documentation following good practices.

At this point, feel free to modify any of them or move the fiddle somewhere
else (but remember to update the reference in the markdown file!).

Thanks for contributing to Electron!

[electron]: https://www.electronjs.org
[fiddle]: https://www.electronjs.org/fiddle
[main repo]: https://github.com/electron/electron
[tutorials]: https://github.com/electron/electron/tree/main/docs/tutorial

---

## File: docs/latest/api/structures/base-window-options.md

---
title: "BaseWindowConstructorOptions Object"
slug: base-window-options
hide_title: false
---

# BaseWindowConstructorOptions Object

* `width` Integer (optional) - Window's width in pixels. Default is `800`.
* `height` Integer (optional) - Window's height in pixels. Default is `600`.
* `x` Integer (optional) - (**required** if y is used) Window's left offset from screen.
  Default is to center the window.
* `y` Integer (optional) - (**required** if x is used) Window's top offset from screen.
  Default is to center the window.
* `useContentSize` boolean (optional) - The `width` and `height` would be used as web
  page's size, which means the actual window's size will include window
  frame's size and be slightly larger. Default is `false`.
* `center` boolean (optional) - Show window in the center of the screen. Default is `false`.
* `minWidth` Integer (optional) - Window's minimum width. Default is `0`.
* `minHeight` Integer (optional) - Window's minimum height. Default is `0`.
* `maxWidth` Integer (optional) - Window's maximum width. Default is no limit.
* `maxHeight` Integer (optional) - Window's maximum height. Default is no limit.
* `resizable` boolean (optional) - Whether window is resizable. Default is `true`.
* `movable` boolean (optional) _macOS_ _Windows_ - Whether window is
  movable. This is not implemented on Linux. Default is `true`.
* `minimizable` boolean (optional) _macOS_ _Windows_ - Whether window is
  minimizable. This is not implemented on Linux. Default is `true`.
* `maximizable` boolean (optional) _macOS_ _Windows_ - Whether window is
  maximizable. This is not implemented on Linux. Default is `true`.
* `closable` boolean (optional) _macOS_ _Windows_ - Whether window is
  closable. This is not implemented on Linux. Default is `true`.
* `focusable` boolean (optional) - Whether the window can be focused. Default is
  `true`. On Windows setting `focusable: false` also implies setting
  `skipTaskbar: true`. On Linux setting `focusable: false` makes the window
  stop interacting with wm, so the window will always stay on top in all
  workspaces.
* `alwaysOnTop` boolean (optional) - Whether the window should always stay on top of
  other windows. Default is `false`. Not supported on Wayland (Linux).
* `fullscreen` boolean (optional) - Whether the window should show in fullscreen. When
  explicitly set to `false` the fullscreen button will be hidden or disabled
  on macOS. Default is `false`.
* `fullscreenable` boolean (optional) - Whether the window can be put into fullscreen
  mode. On macOS, also whether the maximize/zoom button should toggle full
  screen mode or maximize window. Default is `true`.
* `simpleFullscreen` boolean (optional) _macOS_ - Use pre-Lion fullscreen on
  macOS. Default is `false`.
* `skipTaskbar` boolean (optional) _macOS_ _Windows_ - Whether to show the window in taskbar.
  Default is `false`.
* `hiddenInMissionControl` boolean (optional) _macOS_ - Whether window should be hidden when the user toggles into mission control.
* `kiosk` boolean (optional) - Whether the window is in kiosk mode. Default is `false`.
* `name` string (optional) - A unique identifier for the window, used internally by Electron to enable features such as state persistence. Each window must have a distinct name. It can only be reused after the corresponding window has been destroyed. An error is thrown if the name is already in use. This is not the visible title shown to users on the title bar.
* `windowStatePersistence` ([WindowStatePersistence](window-state-persistence.md) | boolean) (optional) - Configures or enables the persistence of window state (position, size, maximized state, etc.) across application restarts. Has no effect if window `name` is not provided. Automatically disabled when there is no available display. _Experimental_
* `title` string (optional) - Default window title. Default is `"Electron"`. If the HTML tag `<title>` is defined in the HTML file loaded by `loadURL()`, this property will be ignored.
* `icon` ([NativeImage](../native-image.md) | string) (optional) - The window icon. On Windows it is
  recommended to use `ICO` icons to get best visual effects, you can also
  leave it undefined so the executable's icon will be used.
* `show` boolean (optional) - Whether window should be shown when created. Default is
  `true`.
* `frame` boolean (optional) - Specify `false` to create a
  [frameless window](../../tutorial/custom-window-styles.md#frameless-windows). Default is `true`.
* `parent` BaseWindow (optional) - Specify parent window. Default is `null`.
* `modal` boolean (optional) - Whether this is a modal window. This only works when the
  window is a child window. Default is `false`.
* `acceptFirstMouse` boolean (optional) _macOS_ - Whether clicking an
  inactive window will also click through to the web contents. Default is
  `false` on macOS. This option is not configurable on other platforms.
* `disableAutoHideCursor` boolean (optional) - Whether to hide cursor when typing.
  Default is `false`.
* `autoHideMenuBar` boolean (optional) _Linux_ _Windows_ - Auto hide the menu bar
  unless the `Alt` key is pressed. Default is `false`.
* `enableLargerThanScreen` boolean (optional) _macOS_ - Enable the window to
  be resized larger than screen. Only relevant for macOS, as other OSes
  allow larger-than-screen windows by default. Default is `false`.
* `backgroundColor` string (optional) - The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported if `transparent` is set to `true`. Default is `#FFF` (white). See [win.setBackgroundColor](../browser-window.md#winsetbackgroundcolorbackgroundcolor) for more information.
* `hasShadow` boolean (optional) - Whether window should have a shadow. Default is `true`.
* `opacity` number (optional) _macOS_ _Windows_ - Set the initial opacity of
  the window, between 0.0 (fully transparent) and 1.0 (fully opaque). This
  is only implemented on Windows and macOS.
* `darkTheme` boolean (optional) - Forces using dark theme for the window, only works on
  some GTK+3 desktop environments. Default is `false`.
* `transparent` boolean (optional) - Makes the window [transparent](../../tutorial/custom-window-styles.md#transparent-windows).
  Default is `false`. On Windows, does not work unless the window is frameless.
  When you add a [`View`](../view.md) to a `BaseWindow`, you'll need to call
  [`view.setBackgroundColor`](../view.md#viewsetbackgroundcolorcolor) with a transparent
  background color on that view to make its background transparent as well.
* `type` string (optional) - The type of window, default is normal window. See more about
  this below.
* `visualEffectState` string (optional) _macOS_ - Specify how the material
  appearance should reflect window activity state on macOS. Must be used
  with the `vibrancy` property. Possible values are:
  * `followWindow` - The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default.
  * `active` - The backdrop should always appear active.
  * `inactive` - The backdrop should always appear inactive.
* `titleBarStyle` string (optional) - The style of window title bar.
  Default is `default`. Possible values are:
  * `default` - Results in the standard title bar for macOS or Windows respectively.
  * `hidden` - Results in a hidden title bar and a full size content window. On macOS, the window still has the standard window controls (“traffic lights”) in the top left. On Windows and Linux, when combined with `titleBarOverlay: true` it will activate the Window Controls Overlay (see `titleBarOverlay` for more information), otherwise no window controls will be shown.
  * `hiddenInset` _macOS_ - Results in a hidden title bar
    with an alternative look where the traffic light buttons are slightly
    more inset from the window edge.
  * `customButtonsOnHover` _macOS_ - Results in a hidden
    title bar and a full size content window, the traffic light buttons will
    display when being hovered over in the top left of the window.
    **Note:** This option is currently experimental.
* `titleBarOverlay` Object | boolean (optional) -  When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
  * `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
  * `symbolColor` String (optional) _Windows_ _Linux_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
  * `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
* `accentColor` boolean | string (optional) _Windows_ - The accent color for the window. By default, follows user preference in System Settings. Set to `false` to explicitly disable, or set the color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha values will be ignored.
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
  Set a custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) - Whether a frameless window
  should have rounded corners. Default is `true`. On Windows versions older than
  Windows 11 Build 22000 this property has no effect, and frameless windows will
  not have rounded corners. On Linux, rounded corners are only drawn when the
  desktop environment supports client-side decorations.
* `thickFrame` boolean (optional) _Windows_ - Use `WS_THICKFRAME` style for
  frameless windows on Windows, which adds the standard window frame. Setting it
  to `false` will remove window shadow and window animations, and disable window
  resizing via dragging the window edges. Default is `true`.
* `vibrancy` string (optional) _macOS_ - Add a type of vibrancy effect to
  the window, only on macOS. Can be `appearance-based`, `titlebar`, `selection`,
  `menu`, `popover`, `sidebar`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`,
  `tooltip`, `content`, `under-window`, or `under-page`.
* `backgroundMaterial` string (optional) _Windows_ - 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](../browser-window.md#winsetbackgroundmaterialmaterial-windows) for more information.
* `zoomToPageWidth` boolean (optional) _macOS_ - 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`.
* `tabbingIdentifier` string (optional) _macOS_ - Tab group name, allows
  opening the window as a native tab. Windows with the same
  tabbing identifier will be grouped together. This also adds a native new
  tab button to your window's tab bar and allows your `app` and window to
  receive the `new-window-for-tab` event.

When setting minimum or maximum window size with `minWidth`/`maxWidth`/
`minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from
passing a size that does not follow size constraints to `setBounds`/`setSize` or
to the constructor of `BrowserWindow`.

The possible values and behaviors of the `type` option are platform dependent.
Possible values are:

* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
  `notification`.
  * The `desktop` type places the window at the desktop background window level
    (kCGDesktopWindowLevel - 1). However, note that a desktop window will not
    receive focus, keyboard, or mouse events. You can still use globalShortcut to
    receive input sparingly.
  * The `dock` type creates a dock-like window behavior.
  * The `toolbar` type creates a window with a toolbar appearance.
  * The `splash` type behaves in a specific way. It is not
    draggable, even if the CSS styling of the window's body contains
    -webkit-app-region: drag. This type is commonly used for splash screens.
  * The `notification` type creates a window that behaves like a system notification.
* On macOS, possible types are `desktop`, `textured`, `panel`.
  * The `textured` type adds metal gradient appearance. This option is **deprecated**.
  * The `desktop` type places the window at the desktop background window level
    (`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
    focus, keyboard or mouse events, but you can use `globalShortcut` to receive
    input sparingly.
  * The `panel` type enables the window to float on top of full-screened apps
    by adding the `NSWindowStyleMaskNonactivatingPanel` style mask, normally
    reserved for NSPanel, at runtime. Also, the window will appear on all
    spaces (desktops).
* On Windows, possible type is `toolbar`.

[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis

---

## File: docs/latest/api/structures/bluetooth-device.md

---
title: "BluetoothDevice Object"
slug: bluetooth-device
hide_title: false
---

# BluetoothDevice Object

* `deviceName` string
* `deviceId` string

---

## File: docs/latest/api/structures/browser-window-options.md

---
title: "BrowserWindowConstructorOptions Object extends `BaseWindowConstructorOptions`"
slug: browser-window-options
hide_title: false
---

# BrowserWindowConstructorOptions Object extends `BaseWindowConstructorOptions`

* `webPreferences` [WebPreferences](web-preferences.md?inline) (optional) - Settings of web page's features.
* `paintWhenInitiallyHidden` boolean (optional) - Whether the renderer should be active when `show` is `false` and it has just been created.  In order for `document.visibilityState` to work correctly on first load with `show: false` you should set this to `false`.  Setting this to `false` will cause the `ready-to-show` event to not fire.  Default is `true`.

---

## File: docs/latest/api/structures/certificate.md

---
title: "Certificate Object"
slug: certificate
hide_title: false
---

# Certificate Object

* `data` string - PEM encoded data
* `issuer` [CertificatePrincipal](certificate-principal.md) - Issuer principal
* `issuerName` string - Issuer's Common Name
* `issuerCert` Certificate - Issuer certificate (if not self-signed)
* `subject` [CertificatePrincipal](certificate-principal.md) - Subject principal
* `subjectName` string - Subject's Common Name
* `serialNumber` string - Hex value represented string
* `validStart` number - Start date of the certificate being valid in seconds
* `validExpiry` number - End date of the certificate being valid in seconds
* `fingerprint` string - Fingerprint of the certificate

---

## File: docs/latest/api/structures/certificate-principal.md

---
title: "CertificatePrincipal Object"
slug: certificate-principal
hide_title: false
---

# CertificatePrincipal Object

* `commonName` string - Common Name.
* `organizations` string[] - Organization names.
* `organizationUnits` string[] - Organization Unit names.
* `locality` string - Locality.
* `state` string - State or province.
* `country` string - Country or region.

---

## File: docs/latest/api/structures/cookie.md

---
title: "Cookie Object"
slug: cookie
hide_title: false
---

# Cookie Object

* `name` string - The name of the cookie.
* `value` string - The value of the cookie.
* `domain` string (optional) - The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains.
* `hostOnly` boolean (optional) - Whether the cookie is a host-only cookie; this will only be `true` if no domain was passed.
* `path` string (optional) - The path of the cookie.
* `secure` boolean (optional) - Whether the cookie is marked as secure.
* `httpOnly` boolean (optional) - Whether the cookie is marked as HTTP only.
* `session` boolean (optional) - Whether the cookie is a session cookie or a persistent
  cookie with an expiration date.
* `expirationDate` Double (optional) - The expiration date of the cookie as
  the number of seconds since the UNIX epoch. Not provided for session
  cookies.
* `sameSite` string - The [Same Site](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#SameSite_cookies) policy applied to this cookie.  Can be `unspecified`, `no_restriction`, `lax` or `strict`.

---

## File: docs/latest/api/structures/cpu-usage.md

---
title: "CPUUsage Object"
slug: cpu-usage
hide_title: false
---

# CPUUsage Object

* `percentCPUUsage` number - Percentage of CPU used since the last call to getCPUUsage.
  First call returns 0.
* `cumulativeCPUUsage` number (optional) - Total seconds of CPU time used since process
  startup.
* `idleWakeupsPerSecond` number - The number of average idle CPU wakeups per second
  since the last call to getCPUUsage. First call returns 0. Will always return 0 on
  Windows.

---

## File: docs/latest/api/structures/crash-report.md

---
title: "CrashReport Object"
slug: crash-report
hide_title: false
---

# CrashReport Object

* `date` Date
* `id` string