|
1 | | -// Type definitions for Electron 38.2.0+wvcus |
| 1 | +// Type definitions for Electron 38.5.0+wvcus |
2 | 2 | // Project: http://electronjs.org/ |
3 | 3 | // Definitions by: The Electron Team <https://github.com/electron/electron> |
4 | 4 | // Definitions: https://github.com/electron/typescript-definitions |
@@ -1048,6 +1048,30 @@ declare namespace Electron { |
1048 | 1048 | * You should seek to use the `steal` option as sparingly as possible. |
1049 | 1049 | */ |
1050 | 1050 | focus(options?: FocusOptions): void; |
| 1051 | + /** |
| 1052 | + * Array of strings naming currently enabled accessibility support components. |
| 1053 | + * Possible values: |
| 1054 | + * |
| 1055 | + * * `nativeAPIs` - Native OS accessibility APIs integration enabled. |
| 1056 | + * * `webContents` - Web contents accessibility tree exposure enabled. |
| 1057 | + * * `inlineTextBoxes` - Inline text boxes (character bounding boxes) enabled. |
| 1058 | + * * `extendedProperties` - Extended accessibility properties enabled. |
| 1059 | + * * `screenReader` - Screen reader specific mode enabled. |
| 1060 | + * * `html` - HTML accessibility tree construction enabled. |
| 1061 | + * * `labelImages` - Accessibility support for automatic image annotations. |
| 1062 | + * * `pdfPrinting` - Accessibility support for PDF printing enabled. |
| 1063 | + * |
| 1064 | + * Notes: |
| 1065 | + * |
| 1066 | + * * The array may be empty if no accessibility modes are active. |
| 1067 | + * * Use `app.isAccessibilitySupportEnabled()` for the legacy boolean check; prefer |
| 1068 | + * this method for granular diagnostics or telemetry. |
| 1069 | + * |
| 1070 | + * Example: |
| 1071 | + * |
| 1072 | + * @platform darwin,win32 |
| 1073 | + */ |
| 1074 | + getAccessibilitySupportFeatures(): string[]; |
1051 | 1075 | /** |
1052 | 1076 | * Resolve with an object containing the following: |
1053 | 1077 | * |
@@ -1506,11 +1530,32 @@ declare namespace Electron { |
1506 | 1530 | * This API must be called after the `ready` event is emitted. |
1507 | 1531 | * |
1508 | 1532 | * > [!NOTE] Rendering accessibility tree can significantly affect the performance |
1509 | | - * of your app. It should not be enabled by default. |
| 1533 | + * of your app. It should not be enabled by default. Calling this method will |
| 1534 | + * enable the following accessibility support features: `nativeAPIs`, |
| 1535 | + * `webContents`, `inlineTextBoxes`, and `extendedProperties`. |
1510 | 1536 | * |
1511 | 1537 | * @platform darwin,win32 |
1512 | 1538 | */ |
1513 | 1539 | setAccessibilitySupportEnabled(enabled: boolean): void; |
| 1540 | + /** |
| 1541 | + * Possible values are: |
| 1542 | + * |
| 1543 | + * * `nativeAPIs` - Native OS accessibility APIs integration enabled. |
| 1544 | + * * `webContents` - Web contents accessibility tree exposure enabled. |
| 1545 | + * * `inlineTextBoxes` - Inline text boxes (character bounding boxes) enabled. |
| 1546 | + * * `extendedProperties` - Extended accessibility properties enabled. |
| 1547 | + * * `screenReader` - Screen reader specific mode enabled. |
| 1548 | + * * `html` - HTML accessibility tree construction enabled. |
| 1549 | + * * `labelImages` - Accessibility support for automatic image annotations. |
| 1550 | + * * `pdfPrinting` - Accessibility support for PDF printing enabled. |
| 1551 | + * |
| 1552 | + * To disable all supported features, pass an empty array `[]`. |
| 1553 | + * |
| 1554 | + * Example: |
| 1555 | + * |
| 1556 | + * @platform darwin,win32 |
| 1557 | + */ |
| 1558 | + setAccessibilitySupportFeatures(features: string[]): void; |
1514 | 1559 | /** |
1515 | 1560 | * Sets the activation policy for a given app. |
1516 | 1561 | * |
@@ -3800,9 +3845,12 @@ declare namespace Electron { |
3800 | 3845 | */ |
3801 | 3846 | tabbingIdentifier?: string; |
3802 | 3847 | /** |
3803 | | - * Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard |
3804 | | - * window frame. Setting it to `false` will remove window shadow and window |
3805 | | - * animations. Default is `true`. |
| 3848 | + * Use `WS_THICKFRAME` style for frameless windows on Windows, which adds the |
| 3849 | + * standard window frame. Setting it to `false` will remove window shadow and |
| 3850 | + * window animations, and disable window resizing via dragging the window edges. |
| 3851 | + * Default is `true`. |
| 3852 | + * |
| 3853 | + * @platform win32 |
3806 | 3854 | */ |
3807 | 3855 | thickFrame?: boolean; |
3808 | 3856 | /** |
@@ -18456,7 +18504,9 @@ declare namespace Electron { |
18456 | 18504 | * If set, this will sandbox the renderer associated with the window, making it |
18457 | 18505 | * compatible with the Chromium OS-level sandbox and disabling the Node.js engine. |
18458 | 18506 | * This is not the same as the `nodeIntegration` option and the APIs available to |
18459 | | - * the preload script are more limited. Read more about the option here. |
| 18507 | + * the preload script are more limited. Default is `true` since Electron 20. The |
| 18508 | + * sandbox will automatically be disabled when `nodeIntegration` is set to `true`. |
| 18509 | + * Read more about the option here. |
18460 | 18510 | */ |
18461 | 18511 | sandbox?: boolean; |
18462 | 18512 | /** |
|
0 commit comments