Skip to content

Commit 1920d09

Browse files
committed
chore: linting
1 parent 5249ccf commit 1920d09

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

blog/electron-33-0.md

+36-31
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ The Electron team is excited to announce the release of Electron 33.0.0! You can
1414

1515
If you have any feedback, please share it with us on [Twitter](https://twitter.com/electronjs) or [Mastodon](https://social.lfx.dev/@electronjs), or join our community [Discord](https://discord.com/invite/electronjs)! Bugs and feature requests can be reported in Electron's [issue tracker](https://github.com/electron/electron/issues).
1616

17-
1817
## Notable Changes
1918

2019
### Highlights
2120

22-
- Added an event to help unlock cryptographic devices when a PIN is needed. [#41205](https://github.com/electron/electron/pull/41205)
21+
- Added an event to help unlock cryptographic devices when a PIN is needed. [#41205](https://github.com/electron/electron/pull/41205)
2322
- Extended `navigationHistory` API with 2 new functions for better history management. [#42014](https://github.com/electron/electron/pull/42014)
2423
- Improved native theme transparency checking. [#42862](https://github.com/electron/electron/pull/42862)
2524

@@ -37,10 +36,10 @@ Electron 33 upgrades Chromium from `128.0.6613.36` to `130.0.6723.44`, Node from
3736

3837
### New Features
3938

40-
* Added the event `client-certificate-request-password` to app. It is dispatched when a PIN is needed to unlock a cryptographic device. [#41205](https://github.com/electron/electron/pull/41205)
41-
* Added error event in utility process to support diagnostic reports on V8 fatal errors. [#43997](https://github.com/electron/electron/pull/43997)
42-
* Added `View.setBorderRadius(radius)` for customizing the border radius of views—with compatibility for `WebContentsView`. [#42320](https://github.com/electron/electron/pull/42320)
43-
* Extended `navigationHistory` API with 2 new functions for better history management. [#42014](https://github.com/electron/electron/pull/42014)
39+
- Added the event `client-certificate-request-password` to app. It is dispatched when a PIN is needed to unlock a cryptographic device. [#41205](https://github.com/electron/electron/pull/41205)
40+
- Added error event in utility process to support diagnostic reports on V8 fatal errors. [#43997](https://github.com/electron/electron/pull/43997)
41+
- Added `View.setBorderRadius(radius)` for customizing the border radius of views—with compatibility for `WebContentsView`. [#42320](https://github.com/electron/electron/pull/42320)
42+
- Extended `navigationHistory` API with 2 new functions for better history management. [#42014](https://github.com/electron/electron/pull/42014)
4443

4544
### Breaking Changes
4645

@@ -53,29 +52,37 @@ or later will be required to run Electron v33.0.0 and higher.
5352

5453
#### Behavior Changed: custom protocol URL handling on Windows
5554

56-
Due to changes made in Chromium to support [Non-Special Scheme URLs](http://bit.ly/url-non-special), custom protocol URLs that use Windows file paths will no longer work correctly with the deprecated `protocol.registerFileProtocol` and the `baseURLForDataURL` property on `BrowserWindow.loadURL`, `WebContents.loadURL`, and `<webview>.loadURL`. `protocol.handle` will also not work with these types of URLs but this is not a change since it has always worked that way.
55+
Due to changes made in Chromium to support [Non-Special Scheme URLs](http://bit.ly/url-non-special), custom protocol URLs that use Windows file paths will no longer work correctly with the deprecated `protocol.registerFileProtocol` and the `baseURLForDataURL` property on `BrowserWindow.loadURL`, `WebContents.loadURL`, and `<webview>.loadURL`. `protocol.handle` will also not work with these types of URLs but this is not a change since it has always worked that way.
5756

5857
```js
5958
// No longer works
6059
protocol.registerFileProtocol('other', () => {
61-
callback({ filePath: '/path/to/my/file' })
62-
})
60+
callback({ filePath: '/path/to/my/file' });
61+
});
6362

64-
const mainWindow = new BrowserWindow()
65-
mainWindow.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', { baseURLForDataURL: 'other://C:\\myapp' })
66-
mainWindow.loadURL('other://C:\\myapp\\index.html')
63+
const mainWindow = new BrowserWindow();
64+
mainWindow.loadURL(
65+
'data:text/html,<script src="loaded-from-dataurl.js"></script>',
66+
{ baseURLForDataURL: 'other://C:\\myapp' }
67+
);
68+
mainWindow.loadURL('other://C:\\myapp\\index.html');
6769

6870
// Replace with
69-
const path = require('node:path')
70-
const nodeUrl = require('node:url')
71+
const path = require('node:path');
72+
const nodeUrl = require('node:url');
7173
protocol.handle(other, (req) => {
72-
const srcPath = 'C:\\myapp\\'
73-
const reqURL = new URL(req.url)
74-
return net.fetch(nodeUrl.pathToFileURL(path.join(srcPath, reqURL.pathname)).toString())
75-
})
76-
77-
mainWindow.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', { baseURLForDataURL: 'other://' })
78-
mainWindow.loadURL('other://index.html')
74+
const srcPath = 'C:\\myapp\\';
75+
const reqURL = new URL(req.url);
76+
return net.fetch(
77+
nodeUrl.pathToFileURL(path.join(srcPath, reqURL.pathname)).toString()
78+
);
79+
});
80+
81+
mainWindow.loadURL(
82+
'data:text/html,<script src="loaded-from-dataurl.js"></script>',
83+
{ baseURLForDataURL: 'other://' }
84+
);
85+
mainWindow.loadURL('other://index.html');
7986
```
8087

8188
#### Behavior Changed: `webContents` property on `login` on `app`
@@ -94,21 +101,22 @@ The `systemPreferences.accessibilityDisplayShouldReduceTransparency` property is
94101

95102
```js
96103
// Deprecated
97-
const shouldReduceTransparency = systemPreferences.accessibilityDisplayShouldReduceTransparency
104+
const shouldReduceTransparency =
105+
systemPreferences.accessibilityDisplayShouldReduceTransparency;
98106

99107
// Replace with:
100-
const prefersReducedTransparency = nativeTheme.prefersReducedTransparency
108+
const prefersReducedTransparency = nativeTheme.prefersReducedTransparency;
101109
```
102110

103111
## End of Support for 30.x.y
104112

105113
Electron 30.x.y has reached end-of-support as per the project's [support policy](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy). Developers and applications are encouraged to upgrade to a newer version of Electron.
106114

107-
| E33 (Oct'24) | E34 (Jan'25) | E35 (Apr'25)
108-
| ------------ | ------------ | ------------
109-
| 33.x.y | 34.x.y | 35.x.y
110-
| 32.x.y | 33.x.y | 34.x.y
111-
| 31.x.y | 32.x.y | 33.x.y
115+
| E33 (Oct'24) | E34 (Jan'25) | E35 (Apr'25) |
116+
| ------------ | ------------ | ------------ |
117+
| 33.x.y | 34.x.y | 35.x.y |
118+
| 32.x.y | 33.x.y | 34.x.y |
119+
| 31.x.y | 32.x.y | 33.x.y |
112120

113121
## What's Next
114122

@@ -117,6 +125,3 @@ In the short term, you can expect the team to continue to focus on keeping up wi
117125
You can find [Electron's public timeline here](https://www.electronjs.org/docs/latest/tutorial/electron-timelines).
118126

119127
More information about future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) page.
120-
121-
122-

0 commit comments

Comments
 (0)