This commit is contained in:
Erick Zhao 2023-03-15 16:03:25 -07:00 коммит произвёл GitHub
Родитель 2edde7b069
Коммит a12017a91d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
115 изменённых файлов: 1630 добавлений и 1261 удалений

14
.github/workflows/build-and-deploy.yml поставляемый
Просмотреть файл

@ -31,14 +31,14 @@ jobs:
if: ${{ inputs.branch == 'main' }}
run: echo ${{ inputs.branch }}
# This should be set up from earlier
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: Test
run: yarn test
run: yarn lint && yarn test
env:
CI: true
# FIXME: this is stalling
@ -60,7 +60,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish "/assets" to Storage if version branch
if: ${{ inputs.branch == 'version' }}
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
with:
timeout_seconds: 300
max_attempts: 3
@ -70,7 +70,7 @@ jobs:
SAS: ${{ secrets.SAS }}
- name: Publish "/docs" to Storage if version branch
if: ${{ inputs.branch == 'version' }}
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
with:
timeout_seconds: 300
max_attempts: 3
@ -80,7 +80,7 @@ jobs:
SAS: ${{ secrets.SAS }}
- name: Publish everything to Storage if main branch
if: ${{ inputs.branch == 'main' }}
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag: v2.8.3
with:
timeout_seconds: 300
max_attempts: 3

8
.github/workflows/pull-request.yml поставляемый
Просмотреть файл

@ -13,17 +13,17 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- name: Use Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: Test
run: yarn test
run: yarn lint && yarn test
env:
CI: true

6
.github/workflows/push-main.yml поставляемый
Просмотреть файл

@ -11,13 +11,13 @@ jobs:
name: Upload to Crowdin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- name: Use Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: Upload sources to Crowdin
run: 'yarn i18n:upload'
env:

6
.github/workflows/semantic.yml поставляемый
Просмотреть файл

@ -1,4 +1,4 @@
name: "Check Semantic Commit"
name: 'Check Semantic Commit'
on:
pull_request_target:
@ -13,8 +13,8 @@ permissions:
jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
name: Validate PR Title
runs-on: ubuntu-latest
steps:

6
.github/workflows/update-docs-branch.yml поставляемый
Просмотреть файл

@ -10,15 +10,15 @@ jobs:
outputs:
branch: ${{ steps.branch.outputs.branch }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- name: 'Switch branches'
# We switch to the version branch or create a new one if needed
run: git fetch origin && git checkout -t origin/v${{ github.event.client_payload.branch}} || git checkout -b v${{ github.event.client_payload.branch}}
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: 'Prebuild'
run: 'yarn pre-build ${{ github.event.client_payload.sha }}'
- name: 'Push changes or create PR'

6
.github/workflows/update-docs.yml поставляемый
Просмотреть файл

@ -10,12 +10,12 @@ jobs:
outputs:
branch: ${{ steps.branch.outputs.branch }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: 'Prebuild'
run: 'yarn pre-build ${{ github.event.client_payload.sha }} ${{ github.event.client_payload.branch}}'
- name: 'Push changes or create PR'

22
.github/workflows/update-governance.yml поставляемый
Просмотреть файл

@ -2,20 +2,20 @@ name: Update Governance Page Data
on:
schedule:
- cron: '0 13 * * 1'
- cron: '0 13 * * 1'
jobs:
governance:
name: Updates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
run: 'yarn'
- name: Update governance data and push
run: 'yarn governance'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
run: 'yarn'
- name: Update governance data and push
run: 'yarn governance'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

6
.github/workflows/update-i18n-deploy.yml поставляемый
Просмотреть файл

@ -12,15 +12,15 @@ jobs:
name: 'Build and deploy localized site'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- name: Use Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- name: Download crowdin translation
run: yarn i18n:download

4
.husky/pre-commit Executable file
Просмотреть файл

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged

7
.prettierignore Normal file
Просмотреть файл

@ -0,0 +1,7 @@
node_modules
.docusaurus
build/
docs/
create-electron-documentation/
i18n/
!i18n/en/

6
.vscode/launch.json поставляемый
Просмотреть файл

@ -18,9 +18,7 @@
"name": "vscode-jest-tests",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand"
],
"args": ["--runInBand"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
@ -46,6 +44,6 @@
"program": "${workspaceFolder}/create-electron-documentation/index.js",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/docs/how-to"
},
}
]
}

Просмотреть файл

@ -137,7 +137,7 @@ What have we been doing to develop our community presence?
[@bandantonio](https://github.com/bandantonio) to rework Electrons new user tutorial flow.
- In 2022, we mentored a Google Summer of Code student for the first time.
[@aryanshridhar](https://github.com/aryanshridhar) did some awesome work to refactor [Electron
Fiddle](https://github.com/electron/fiddle)'s core version loading logic and migrate its bundler
Fiddle](https://github.com/electron/fiddle)'s core version loading logic and migrate its bundler
to [webpack](https://webpack.js.org/).
### Automate all the things!
@ -231,19 +231,21 @@ Altogether, our little family of bots has given us a huge boost in developer pro
As we enter our second decade as a project, you might be asking: whats next for Electron?
Were going to stay in sync with Chromium's release cadence, releasing new major versions of
Electron every 8 weeks, keeping the framework updated with the latest and greatest from the web
Were going to stay in sync with Chromium's release cadence, releasing new major versions of
Electron every 8 weeks, keeping the framework updated with the latest and greatest from the web
platform and Node.js while maintaining stability and security for enterprise-grade applications.
We generally announce news on upcoming initiatives when they become concrete. If you want to
keep up with future releases, features, and general project updates, you can read
[our blog](https://electronjs.org/blog) and follow our social media profiles
We generally announce news on upcoming initiatives when they become concrete. If you want to
keep up with future releases, features, and general project updates, you can read
[our blog](https://electronjs.org/blog) and follow our social media profiles
([Twitter](https://twitter.com/electronjs) and [Mastodon](https://social.lfx.dev/@electronjs))!
[^1]: This is actually the first commit from the
[electron-archive/brightray project](https://github.com/electron-archive/brightray), which got
absorbed into Electron in 2017 and had its git history merged. But whos counting?
Its our birthday, so we get to make the rules!
[^1]:
This is actually the first commit from the
[electron-archive/brightray project](https://github.com/electron-archive/brightray), which got
absorbed into Electron in 2017 and had its git history merged. But whos counting?
Its our birthday, so we get to make the rules!
[^2]: Contrary to popular belief, Electron is no longer owned by GitHub or Microsoft, and is part of
the [OpenJS Foundation](https://openjsf.org/) nowadays.
[^2]:
Contrary to popular belief, Electron is no longer owned by GitHub or Microsoft, and is part of
the [OpenJS Foundation](https://openjsf.org/) nowadays.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: 2015-whats-new-in-electron
---
There have been some interesting updates and talks given on Electron recently, here's a roundup.
---
@ -83,17 +84,21 @@ Atom has now upgraded to Electron `v0.30.6` running Chrome 44. An upgrade to `v0
GitHubber [Amy Palamountain](https://github.com/ammeep) gave a great introduction to Electron in a talk at [Nordic.js](https://nordicjs2015.confetti.events). She also created the [electron-accelerator](https://github.com/ammeep/electron-accelerator) library.
#### Building native applications with Electron by Amy Palomountain
<div className="video"><iframe width="560" height="315" src="https://www.youtube.com/embed/OHOPSvTltPI" frameBorder="0" allowFullScreen></iframe></div>
[Ben Ogle](https://github.com/benogle), also on the Atom team, gave an Electron talk at [YAPC Asia](http://yapcasia.org/2015/):
#### Building Desktop Apps with Web Technologies by Ben Ogle
<div className="video"><iframe width="560" height="315" src="https://www.youtube.com/embed/WChjh5zaUdw" frameBorder="0" allowFullScreen></iframe></div>
Atom team member [Kevin Sawicki](https://github.com/kevinsawicki) and others gave talks on Electron at the [Bay Are Electron User Group](http://www.meetup.com/Bay-Area-Electron-User-Group/) meetup recently. The [videos](http://www.wagonhq.com/blog/electron-meetup) have been posted, here are a couple:
#### The History of Electron by Kevin Sawicki
<div className="video"><iframe width="560" height="315" src="https://www.youtube.com/embed/tP8Yp1boQ9c" frameBorder="0" allowFullScreen></iframe></div>
#### Making a web app feel native by Ben Gotow
<div className="video"><iframe width="560" height="315" src="https://www.youtube.com/embed/JIRXVGVPzn8" frameBorder="0" allowFullScreen></iframe></div>

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/erickzhao.png?size=96'
slug: 2020-season-of-docs
---
Electron is proud to be participating in the second edition of Google's Season of Docs initiative, which pairs mentors from open source organizations with technical writers to improve project documentation.
---
@ -33,6 +34,6 @@ If you want to discuss project proposals, shoot us an email at [season-of-docs@e
# References
* [Electron documentation](https://www.electronjs.org/docs)
* [Project ideas document](https://github.com/electron/season-of-docs-2020/blob/master/project-ideas.md)
* [Season of Docs tech writer guide](https://developers.google.com/season-of-docs/docs/tech-writer-guide)
- [Electron documentation](https://www.electronjs.org/docs)
- [Project ideas document](https://github.com/electron/season-of-docs-2020/blob/master/project-ideas.md)
- [Season of Docs tech writer guide](https://developers.google.com/season-of-docs/docs/tech-writer-guide)

Просмотреть файл

@ -33,7 +33,7 @@ Major API proposals in the Electron project that require consensus go through a
This year, we have driven forward two major proposals that have the potential to unlock a new
dimension of capabilities for Electron apps. These proposals are highly experimental, but heres a
sneak peek of what to expect!
sneak peek of what to expect!
### New native addon enhancements (C APIs)
@ -109,6 +109,7 @@ Electron Forge 6 comes with first-class TypeScript and Webpack support, as well
API that allows developers to create their own plugins and installers.
### Stay tuned: announcement coming soon
If youre interested in building a project with Forge or building templates or plugins with Forges
extensible third-party APIs, stay tuned for our official announcement on the Forge v6 stable
release sometime this month!

Просмотреть файл

@ -36,18 +36,19 @@ In order to be selected as an Electron contributor for Google Summer of Code, yo
Want to apply? First, check out the [five project idea drafts](https://docs.google.com/document/d/1hJBiju0185Tga99WF3023u0uHgnfCG-J1DfzmhYHca0/edit?usp=sharing) that we have prepared. All of the listed ideas are currently open for proposals. We are also open to accepting new ideas that are not on the proposed project list.
Your application should include:
* Your proposal, which is a written document that describes in detail what you plan to achieve over the course of the summer.
* Your background as a developer. If you have a resume, please include a copy, otherwise tell us about your past experience with an emphasis on relevant technical experience.
- Your proposal, which is a written document that describes in detail what you plan to achieve over the course of the summer.
- Your background as a developer. If you have a resume, please include a copy, otherwise tell us about your past experience with an emphasis on relevant technical experience.
[A detailed guide of what to submit as part of your Electron application is here.](https://docs.google.com/document/d/17vDEvxq7bEwFXO-hJX7bsnyDCx8aRK3yo-rerrxYaOk/edit?usp=sharing)
You can also read through the [official GSoC student/contributor guide](https://google.github.io/gsocguides/student/) for important tips on preparing your proposal.
You can also read through the [official GSoC student/contributor guide](https://google.github.io/gsocguides/student/) for important tips on preparing your proposal.
If you want to discuss project proposals or have questions, come hang out in our [#gsoc-general Discord channel](https://discord.gg/w25Dn82xw9)!
## References
* [Electron Proposal Guide](https://docs.google.com/document/d/17vDEvxq7bEwFXO-hJX7bsnyDCx8aRK3yo-rerrxYaOk/edit?usp=sharing)
* [Electron GitHub](https://github.com/electron/electron)
* [Project Ideas Document](https://docs.google.com/document/d/1hJBiju0185Tga99WF3023u0uHgnfCG-J1DfzmhYHca0/edit?usp=sharing)
* [Google Summer of Code Student/Contributor Guide](https://google.github.io/gsocguides/student/)
- [Electron Proposal Guide](https://docs.google.com/document/d/17vDEvxq7bEwFXO-hJX7bsnyDCx8aRK3yo-rerrxYaOk/edit?usp=sharing)
- [Electron GitHub](https://github.com/electron/electron)
- [Project Ideas Document](https://docs.google.com/document/d/1hJBiju0185Tga99WF3023u0uHgnfCG-J1DfzmhYHca0/edit?usp=sharing)
- [Google Summer of Code Student/Contributor Guide](https://google.github.io/gsocguides/student/)

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: 8-week-cadence
---
Beginning in September 2021, Electron will release a new major stable version every 8 weeks.
---
@ -31,25 +32,25 @@ With these two requirements, our team faced a timing dilemma. Moving Electron 15
To help with this switchover, Electron will offer a temporary **alpha build**, only for the Electron 15 release. This alpha build will allow developers more time to test and plan for an Electron 15 release, with a more stable build than our current nightlies.
The alpha channel build will ship for **Electron 15** on **July 20th, 2021**. It will transition to a beta release on **September 1st, 2021** with a stable release target of **September 21st, 2021**. Subsequent Electron releases will not have alpha releases.
The alpha channel build will ship for **Electron 15** on **July 20th, 2021**. It will transition to a beta release on **September 1st, 2021** with a stable release target of **September 21st, 2021**. Subsequent Electron releases will not have alpha releases.
## 2021 Plan for Releases
Below is our current release schedule for 2021:
| Electron | Chrome | Alpha Release | Beta Release | Stable Release | Stable Cycle (Weeks) |
| -------- | ------ | ----- | ---- | ------ | -------- |
| E13 | M91 | - | 2021-Mar-05 | 2021-May-25 | 12 |
| E14 | M93 | - | 2021-May-26 | 2021-Aug-31 | 14 |
| E15 | M94 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | 9 (includes alpha) |
| E16 | M96 | - | 2021-Sep-22 | 2021-Nov-16 | 8 |
| E17 | M98 | - | 2021-Nov-17 | 2022-Feb-01 | 11 |
| -------- | ------ | ------------- | ------------ | -------------- | -------------------- |
| E13 | M91 | - | 2021-Mar-05 | 2021-May-25 | 12 |
| E14 | M93 | - | 2021-May-26 | 2021-Aug-31 | 14 |
| E15 | M94 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | 9 (includes alpha) |
| E16 | M96 | - | 2021-Sep-22 | 2021-Nov-16 | 8 |
| E17 | M98 | - | 2021-Nov-17 | 2022-Feb-01 | 11 |
Adding the alpha channel extends the development time before Electron 15's launch from 3 weeks to 9 weeks - closer to our new 8 week cycle, while still meeting the requirements for Windows Store submission.
To further help app developers, **for the remainder of 2021 until May 2022, we will also be extending our supported versions policy from the latest 3 versions to the latest 4 versions of Electron.** That means that even if you can't immediately alter your upgrade schedule, older versions of Electron will still receive security updates and fixes.
## Addressing Concerns
## Addressing Concerns
There's a reason we're publishing this post well before this release cycle change is scheduled. We know that a faster release cycle will have a real impact on Electron apps - some of which may already find our major release cadence aggressive.
@ -77,11 +78,10 @@ We will be extending our supported version policy from the latest three versions
| E13 (May'21) | E14 (Aug'21) | E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 11.x.y | 12.x.y | 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| -- | -- | 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 11.x.y | 12.x.y | 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| -- | -- | 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## Questions?

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: accessibility-tools
---
Making accessible applications is important and we're happy to introduce new functionality to [Devtron](https://electronjs.org/devtron) and [Spectron](https://electronjs.org/spectron) that gives developers the opportunity to make their apps better for everyone.
---
@ -22,9 +23,9 @@ In the testing framework Spectron, you can now audit each window and `<webview>`
```javascript
app.client.auditAccessibility().then(function (audit) {
if (audit.failed) {
console.error(audit.message)
console.error(audit.message);
}
})
});
```
You can read more about this feature in [Spectron's documentation](https://github.com/electron/spectron#accessibility-testing).

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: api-docs-json-schema
---
Today we're announcing some improvements to Electron's documentation. Every new
release now includes a
[JSON file](https://github.com/electron/electron/releases/download/v1.4.1/electron-api.json)

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: app-feedback-program
---
Electron is working on making its release cycles faster and more stable. To make that possible, we've started the App Feedback Program for large-scale Electron apps to test our beta releases and report app-specific issues to us. This helps us to prioritize work that will get applications upgraded to our next stable release sooner.
Edit (2020-05-21): This program has been retired.
@ -14,28 +15,36 @@ Edit (2020-05-21): This program has been retired.
---
## Who can join?
Our criteria and expectations for apps joining this program include the following items:
- Test your app during the beta period for 10,000+ user-hours
- Have a single point-person who will check in weekly to discuss your app's Electron bugs and app blockers
- You agree to abide by Electron's [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md)
- You are willing to share the following information listed in the next question
## What info does my Electron app have to share?
- Total user-hours your app has been running with any beta release
- Version of Electron that your app is testing with (e.g., 4.0.0-beta.3)
- Any bugs preventing your application from upgrading to the release line being beta tested
## User-hours
We understand not everyone can share exact user numbers, however better data helps us decide how stable a particular release is. We ask that apps commit to testing a minimum number of user-hours, currently 10,000 across the beta cycle.
- 10 user-hours could be 10 people testing for one hour, or one person testing for 10 hours
- You can split the testing between beta releases, for example test for 5,000 user-hours on 3.0.0-beta.2 and then test for 5,000 user-hours on 3.0.0-beta.5. More is better, but we understand that some applications cannot test every beta release
- CI or QA hours do not count towards the total; however, internal releases do count
## Why should my Electron app join?
Your app's bugs will be tracked and be on the core Electron team's radar. Your feedback helps the Electron team to see how the new betas are doing and what work needs to be done.
## Will my application's info be shared publicly? Who gets to see this info?
No, your application's information will not be shared with the general public. Information is kept in a private GitHub repo that is only viewable to members of the App Feedback Program and [Electron Governance](https://github.com/electron/governance). All members have agreed to follow Electron's [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md).
## Sign up
We are currently accepting a *limited number* of signups. If you are interested and are able to fulfill the above requirements, please fill out this [form](https://goo.gl/forms/OpMEKV75ScN6we7g1).
We are currently accepting a _limited number_ of signups. If you are interested and are able to fulfill the above requirements, please fill out this [form](https://goo.gl/forms/OpMEKV75ScN6we7g1).

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/MarshallOfSound.png?size=96'
slug: apple-silicon
---
With Apple Silicon hardware being released later this year, what does the path look like for you to get your Electron app running on the new hardware?
---
@ -31,15 +32,14 @@ Update: This package is now available at [`@electron/universal`](https://github.
As you are targeting a new architecture, you'll need to update several dependencies which may cause build issues. The minimum version of certain dependencies are included below for your reference.
| Dependency | Version Requirement |
|------------|---------------------|
| Xcode | `>=12.2.0` |
| `node-gyp` | `>=7.1.0` |
| `electron-rebuild` | `>=1.12.0` |
| `electron-packager` | `>=15.1.0` |
As a result of these dependency version requirements, you may have to fix/update certain native modules. One thing of note is that the Xcode upgrade will introduce a new version of the macOS SDK, which may cause build failures for your native modules.
| Dependency | Version Requirement |
| ------------------- | ------------------- |
| Xcode | `>=12.2.0` |
| `node-gyp` | `>=7.1.0` |
| `electron-rebuild` | `>=1.12.0` |
| `electron-packager` | `>=15.1.0` |
As a result of these dependency version requirements, you may have to fix/update certain native modules. One thing of note is that the Xcode upgrade will introduce a new version of the macOS SDK, which may cause build failures for your native modules.
## How do I test it?
@ -47,8 +47,8 @@ Currently, Apple Silicon applications only run on Apple Silicon hardware, which
## What about Rosetta 2?
Rosetta 2 is Apple's latest iteration of their [Rosetta](https://en.wikipedia.org/wiki/Rosetta_(software)) technology, which allows you to run x64 Intel applications on their new arm64 Apple Silicon hardware. Although we believe that x64 Electron apps will run under Rosetta 2, there are some important things to note (and reasons why you should ship a native arm64 binary).
Rosetta 2 is Apple's latest iteration of their [Rosetta](<https://en.wikipedia.org/wiki/Rosetta_(software)>) technology, which allows you to run x64 Intel applications on their new arm64 Apple Silicon hardware. Although we believe that x64 Electron apps will run under Rosetta 2, there are some important things to note (and reasons why you should ship a native arm64 binary).
* Your app's performance will be significantly degraded. Electron / V8 uses [JIT](https://en.wikipedia.org/wiki/Just-in-time_compilation) compilation for JavaScript, and due to how Rosetta works, you will effectively be running JIT twice (once in V8 and once in Rosetta).
* You lose the benefit of new technology in Apple Silicon, such as the increased memory page size.
* Did we mention that the performance will be **significantly** degraded?
- Your app's performance will be significantly degraded. Electron / V8 uses [JIT](https://en.wikipedia.org/wiki/Just-in-time_compilation) compilation for JavaScript, and due to how Rosetta works, you will effectively be running JIT twice (once in V8 and once in Rosetta).
- You lose the benefit of new technology in Apple Silicon, such as the increased memory page size.
- Did we mention that the performance will be **significantly** degraded?

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: august-2016-roundup
---
Here are the new Electron apps that were added to the site in August.
---
@ -19,26 +20,26 @@ If you've made an Electron app or host a meetup, make a [pull request](https://g
{: .table .table-ruled .table-full-width .table-with-spacious-first-column .mb-7}
| | | |
| --- | --- | -- |
| <img src='/images/apps/coderpgify.png' width='50'/> | [Code RPGify](http://code.rpgify.com) | RPG style coding application |
| <img src='/images/apps/pamfax.png' width='50'/> | [PamFax](https://www.pamfax.biz) | A cross-platform app for sending and receiving faxes |
| <img src='/images/apps/blankup.png' width='50'/> | [BlankUp](https://hoverbaum.github.io/BlankUp-Electron/) | Markdown editor witch clarity +1 |
| <img src='/images/apps/rambox.png' width='50'/> | [Rambox](http://rambox.pro) | Free and Open Source messaging and emailing app that combines common web applications into one |
| <img src='/images/apps/gordie.png' width='50'/> | [Gordie](http://gordie-app.bitbucket.org/) | The best app for your card collections |
| <img src='/images/apps/ionic-creator.png' width='50'/> | [Ionic Creator](https://github.com/Meadowcottage/Ionic-Creator) | Build amazing mobile apps, faster |
| <img src='/images/apps/twitchalerts.png' width='50'/> | [TwitchAlerts](https://github.com/Meadowcottage/TwitchAlerts) | Keep your viewers happy with beautiful alerts and notifications |
| <img src='/images/apps/museeks.png' width='50'/> | [Museeks](http://museeks.io/) | A simple, clean and cross-platform music player |
| <img src='/images/apps/seapig.png' width='50'/> | [SeaPig](https://github.com/yasumichi/seapig/blob/master/README.md) | A converter from markdown to html |
| <img src='/images/apps/groupme.png' width='50'/> | [GroupMe](https://github.com/dcrousso/GroupMe#readme) | Unofficial GroupMe App |
| <img src='/images/apps/moeditor.png' width='50'/> | [Moeditor](https://moeditor.github.io/) | Your all-purpose markdown editor |
| <img src='/images/apps/soundnode.png' width='50'/> | [Soundnode](http://www.soundnodeapp.com) | Soundnode App is the Soundcloud for desktop |
| <img src='/images/apps/qmui.png' width='50'/> | [QMUI Web](http://qmuiteam.com/web) | QMUI Web Desktop is an application for managing projects based on QMUI Web Framework |
| <img src='/images/apps/svgsus.png' width='50'/> | [Svgsus](http://www.svgs.us) | Organize, clean and transform your SVGs |
| <img src='/images/apps/ramme.png' width='50'/> | [Ramme](https://github.com/terkelg/ramme) | Unofficial Instagram Desktop App |
| <img src='/images/apps/insomnia.png' width='50'/> | [Insomnia](https://insomnia.rest/) | REST API Client |
| <img src='/images/apps/correo.png' width='50'/> | [Correo](https://github.com/amitmerchant1990/correo) | A menubar/taskbar Gmail App for Windows, macOS and Linux |
| <img src='/images/apps/kongdash.png' width='50'/> | [KongDash](https://ajaysreedhar.github.io/kongdash) | Desktop client for Kong Admin API |
| <img src='/images/apps/react-intl-translation-editor.png' width='50'/> | [Translation Editor](https://bitbucket.org/bflower/react-intl-editor/wiki/Home) | Translation files editor for INTL ICU messages (see formatjsio) |
| <img src='/images/apps/5eplay.png' width='50'/> | [5EClient](https://www.5eplay.com/) | 5EPlay CSGO Client |
| <img src='/images/apps/theme-juice.png' width='50'/> | [Theme Juice](https://www.themejuice.it) | Local WordPress development made easy |
| | | |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| <img src='/images/apps/coderpgify.png' width='50'/> | [Code RPGify](http://code.rpgify.com) | RPG style coding application |
| <img src='/images/apps/pamfax.png' width='50'/> | [PamFax](https://www.pamfax.biz) | A cross-platform app for sending and receiving faxes |
| <img src='/images/apps/blankup.png' width='50'/> | [BlankUp](https://hoverbaum.github.io/BlankUp-Electron/) | Markdown editor witch clarity +1 |
| <img src='/images/apps/rambox.png' width='50'/> | [Rambox](http://rambox.pro) | Free and Open Source messaging and emailing app that combines common web applications into one |
| <img src='/images/apps/gordie.png' width='50'/> | [Gordie](http://gordie-app.bitbucket.org/) | The best app for your card collections |
| <img src='/images/apps/ionic-creator.png' width='50'/> | [Ionic Creator](https://github.com/Meadowcottage/Ionic-Creator) | Build amazing mobile apps, faster |
| <img src='/images/apps/twitchalerts.png' width='50'/> | [TwitchAlerts](https://github.com/Meadowcottage/TwitchAlerts) | Keep your viewers happy with beautiful alerts and notifications |
| <img src='/images/apps/museeks.png' width='50'/> | [Museeks](http://museeks.io/) | A simple, clean and cross-platform music player |
| <img src='/images/apps/seapig.png' width='50'/> | [SeaPig](https://github.com/yasumichi/seapig/blob/master/README.md) | A converter from markdown to html |
| <img src='/images/apps/groupme.png' width='50'/> | [GroupMe](https://github.com/dcrousso/GroupMe#readme) | Unofficial GroupMe App |
| <img src='/images/apps/moeditor.png' width='50'/> | [Moeditor](https://moeditor.github.io/) | Your all-purpose markdown editor |
| <img src='/images/apps/soundnode.png' width='50'/> | [Soundnode](http://www.soundnodeapp.com) | Soundnode App is the Soundcloud for desktop |
| <img src='/images/apps/qmui.png' width='50'/> | [QMUI Web](http://qmuiteam.com/web) | QMUI Web Desktop is an application for managing projects based on QMUI Web Framework |
| <img src='/images/apps/svgsus.png' width='50'/> | [Svgsus](http://www.svgs.us) | Organize, clean and transform your SVGs |
| <img src='/images/apps/ramme.png' width='50'/> | [Ramme](https://github.com/terkelg/ramme) | Unofficial Instagram Desktop App |
| <img src='/images/apps/insomnia.png' width='50'/> | [Insomnia](https://insomnia.rest/) | REST API Client |
| <img src='/images/apps/correo.png' width='50'/> | [Correo](https://github.com/amitmerchant1990/correo) | A menubar/taskbar Gmail App for Windows, macOS and Linux |
| <img src='/images/apps/kongdash.png' width='50'/> | [KongDash](https://ajaysreedhar.github.io/kongdash) | Desktop client for Kong Admin API |
| <img src='/images/apps/react-intl-translation-editor.png' width='50'/> | [Translation Editor](https://bitbucket.org/bflower/react-intl-editor/wiki/Home) | Translation files editor for INTL ICU messages (see formatjsio) |
| <img src='/images/apps/5eplay.png' width='50'/> | [5EClient](https://www.5eplay.com/) | 5EPlay CSGO Client |
| <img src='/images/apps/theme-juice.png' width='50'/> | [Theme Juice](https://www.themejuice.it) | Local WordPress development made easy |

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: autoupdating-electron-apps
---
Today we're releasing a free, open-source, hosted
[updates webservice][update.electronjs.org] and companion
[npm package][update-electron-app]
@ -47,7 +48,7 @@ npm install update-electron-app
Call it from anywhere in your app's [main process]:
```js
require('update-electron-app')()
require('update-electron-app')();
```
That's it! The module will check for updates at app startup, then
@ -83,14 +84,14 @@ service.
🌲 Here's to an evergreen future for Electron apps!
[autoUpdater]: https://electronjs.org/docs/tutorial/updates
[autoupdater]: https://electronjs.org/docs/tutorial/updates
[electron-builder]: https://github.com/electron-userland/electron-builder
[Hazel]: https://github.com/zeit/hazel
[Julian Gruber]: http://juliangruber.com/
[hazel]: https://github.com/zeit/hazel
[julian gruber]: http://juliangruber.com/
[main process]: https://electronjs.org/docs/glossary#main-process
[Deploying an Update Server]: https://electronjs.org/docs/tutorial/updates#deploying-an-update-server
[Nucleus]: https://github.com/atlassian/nucleus
[Samuel Attard]: https://www.samuelattard.com/
[deploying an update server]: https://electronjs.org/docs/tutorial/updates#deploying-an-update-server
[nucleus]: https://github.com/atlassian/nucleus
[samuel attard]: https://www.samuelattard.com/
[update-electron-app]: https://github.com/electron/update-electron-app
[update.electronjs.org]: https://github.com/electron/update.electronjs.org
[Zeit]: https://zeit.co
[zeit]: https://zeit.co

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: beaker-browser
---
This week we caught up with [Paul Frazee](http://pfrazee.github.io/), creator
of [Beaker Browser](https://beakerbrowser.com/). Beaker is an experimental
peer-to-peer web browser that uses the Dat protocol to host sites from users

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/codebytere.png?size=96'
slug: cadence-pause
---
Electron is temporarily pausing major releases
---

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/kevinsawicki.png?size=96'
slug: certificate-transparency-fix
---
Electron [1.4.12] contains an important patch that fixes an upstream Chrome
issue where some Symantec, GeoTrust, and Thawte SSL/TLS certificates
are incorrectly rejected 10 weeks from the build time of [libchromiumcontent],
@ -100,8 +101,6 @@ requests to sites using these affected certificates will start to fail.
</tbody>
</table>
You can verify your app's impact date by setting your computer's clock ahead
and then check to see if [https://symbeta.symantec.com/welcome/](https://symbeta.symantec.com/welcome/)
successfully loads from it.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: chromium-rce-vulnerability
---
A remote code execution vulnerability has been discovered in Google Chromium
that affects all recent versions of Electron. Any Electron app that accesses
remote content is vulnerable to this exploit, regardless of whether the

Просмотреть файл

@ -7,9 +7,10 @@ authors:
image_url: 'https://github.com/nornagon.png?size=96'
slug: cve-2019-13720
---
A High severity vulnerability has been discovered in Chrome which affects all software based on Chromium, including Electron.
This vulnerability has been assigned `CVE-2019-13720`. You can read more about it in the [Chrome Blog Post][announcement].
This vulnerability has been assigned `CVE-2019-13720`. You can read more about it in the [Chrome Blog Post][announcement].
Please note that Chrome has reports of this vulnerability being used in the wild so it is strongly recommended you upgrade Electron as soon as possible.
@ -24,7 +25,8 @@ This affects any Electron application that may run third-party or untrusted Java
Affected apps should upgrade to a patched version of Electron.
We've published new versions of Electron which include fixes for this vulnerability:
* [6.1.4](https://github.com/electron/electron/releases/tag/v6.1.4)
- [6.1.4](https://github.com/electron/electron/releases/tag/v6.1.4)
Electron 7.0.1 automatically included the fix from upstream, before the announcement was made. Electron 8 is similarly unaffected. The vulnerability did not exist in Electron 5, so that version is also unaffected.

Просмотреть файл

@ -16,6 +16,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: dat
---
This week's featured project is [Dat](https://datproject.org/), a
[grant-funded](https://changelog.com/rfc/6), open source, decentralized tool
for distributing data sets. Dat is built and maintained by a

Просмотреть файл

@ -32,11 +32,10 @@ The Electron project will pause for the month of December 2021, then return to f
## Why is this happening?
In short, while maintainers are happy and engaged with the project, _THE WORLD IS TIRED_.
In short, while maintainers are happy and engaged with the project, _THE WORLD IS TIRED_.
December is a quiet month for most companies, so we want to give our maintainers a chance to recharge. We encourage other projects to consider similar measures.
## Should I be worried about the future of Electron?
No. We are able to take this step because the project is in good shape.
Everyone is looking forward to 2022, and we expect good things to come!

Просмотреть файл

@ -30,4 +30,3 @@ The Electron project will pause for the month of December 2022, then return to f
## Why is this happening?
With the success of December Quiet Month 2021, we wanted to bring it back for 2022. December continues to be a quiet month for most companies, so we want to give our maintainers a chance to recharge. Everyone is looking forward to 2023, and we expect good things to come! We encourage other projects to consider similar measures.

Просмотреть файл

@ -7,18 +7,20 @@ authors:
image_url: 'https://github.com/erickzhao.png?size=96'
slug: discord-hacktoberfest-2020
---
Join us for community bonding and a month-long celebration of open-source.
---
![Hacktoberfest and Discord banner](https://user-images.githubusercontent.com/16010076/94834005-add7b380-03c4-11eb-8dfc-af5e3972fa53.png)
# Electron Community Discord Launch
Electrons [Outreach Working Group](https://github.com/electron/governance/tree/master/wg-outreach) is excited to
announce the launch of our official community Discord server!
## Why a new Discord server?
In its early days as the backbone of the [Atom text editor](https://atom.io/), community discussion on the Electron
framework occurred in a single channel in Atoms Slack workspace. As time passed and the two projects were increasingly
decoupled, the relevance of the Atom workspace to the Electron project decreased, and maintainer participation in the
@ -32,17 +34,20 @@ Were setting up this shiny new server to be a central discussion hub for the
news on all things Electron.
## Get in here!
So far, the servers membership consists of a few maintainers who have been working together to set it up, but were
so excited to chat with you all! Come ask for help, keep up to date with Electron releases, or just hang out with other
developers. Weve got a handy [invite for you](https://discord.gg/H6uTh7m) thatll give you access to the server!
# Hacktoberfest 2020
As a large and long-running open-source project, Electron wouldnt have been nearly as successful without all the
contributions from its community, from code submissions to bug reports to documentation changes, and much more.
Thats why we believe in the importance of participating in Hacktoberfest to usher in a wider community of developers
of all skill levels into the project.
## Odds and ends
This year, we dont have a wider project to give you all to work on, but wed like to focus on opportunities to contribute
across the Electron JavaScript ecosystem.
@ -58,6 +63,7 @@ P.S. If you're feeling particularly adventurous, we also have a backlog of issue
tags if you're looking for more of a challenge.
## Stuck? Come chat with us!
Moreover, its also no coincidence that the grand opening of our Discord server coincides with the largest celebration of
open-source software of the year. Check out the #hacktoberfest channel to ask for help on your Hacktoberfest PR. In case
you missed it, [here's the invite link again](https://discord.gg/H6uTh7m)!

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: electron-1-0
---
For the last two years, Electron has helped developers build cross platform
desktop apps using HTML, CSS, and JavaScript. Now we're excited to share a major
milestone for our framework and for the community that created it. The release
@ -63,14 +64,14 @@ designed to help you inspect, debug, and troubleshoot your Electron app.
### Features
* **Require graph** that helps you visualize your app's internal and external
library dependencies in both the main and renderer processes
* **IPC monitor** that tracks and displays the messages sent and received
between the processes in your app
* **Event inspector** that shows you the events and listeners that are registered
in your app on the core Electron APIs such as the window, app, and processes
* **App Linter** that checks your apps for common mistakes and missing
functionality
- **Require graph** that helps you visualize your app's internal and external
library dependencies in both the main and renderer processes
- **IPC monitor** that tracks and displays the messages sent and received
between the processes in your app
- **Event inspector** that shows you the events and listeners that are registered
in your app on the core Electron APIs such as the window, app, and processes
- **App Linter** that checks your apps for common mistakes and missing
functionality
## Spectron

Просмотреть файл

@ -10,11 +10,12 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: electron-10-0
---
Electron 10.0.0 has been released! It includes upgrades to Chromium `85`, V8 `8.5`, and Node.js `12.16`. We've added several new API integrations and improvements. Read below for more details!
---
The Electron team is excited to announce the release of Electron 10.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new features.
The Electron team is excited to announce the release of Electron 10.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new features.
In the Electron 10 release, we also made a change to our release notes. To make it easier to tell what's brand new in Electron 10 and what may have changed between Electron 10 and past releases, we now also include changes that were introduced to Electron 10, but backported to previous releases. We hope this makes it easier to apps to find new features and bug fixes when upgrading Electron.
@ -24,46 +25,46 @@ We can't wait to see what you build with them! Continue reading for details abou
### Stack Changes
* Chromium `85.0.4183.84`
* [New in Chrome 84](https://developers.google.com/web/updates/2020/07/nic84)
* [New in Chrome 85](https://chromereleases.googleblog.com/2020/08/stable-channel-update-for-desktop_25.html)
* Node.js `12.16.3`
* [Node 12.16.3 blog post](https://nodejs.org/en/blog/release/v12.16.3/)
* V8 `8.5`
* [V8 8.4 blog post](https://v8.dev/blog/v8-release-84)
* [V8 8.5 blog post](https://v8.dev/blog/v8-release-85)
- Chromium `85.0.4183.84`
- [New in Chrome 84](https://developers.google.com/web/updates/2020/07/nic84)
- [New in Chrome 85](https://chromereleases.googleblog.com/2020/08/stable-channel-update-for-desktop_25.html)
- Node.js `12.16.3`
- [Node 12.16.3 blog post](https://nodejs.org/en/blog/release/v12.16.3/)
- V8 `8.5`
- [V8 8.4 blog post](https://v8.dev/blog/v8-release-84)
- [V8 8.5 blog post](https://v8.dev/blog/v8-release-85)
### Highlight Features
* Added `contents.getBackgroundThrottling()` method and `contents.backgroundThrottling` property. [#21036]
* Exposed the `desktopCapturer` module in the main process. [#23548](https://github.com/electron/electron/pull/23548)
* Can now check if a given `session` is persistent by calling the `ses.isPersistent()` API. [#22622](https://github.com/electron/electron/pull/22622)
* Resolve network issues that prevented RTC calls from being connected due to network IP address changes and ICE. (Chromium issue 1113227). [#24998](https://github.com/electron/electron/pull/24998)
- Added `contents.getBackgroundThrottling()` method and `contents.backgroundThrottling` property. [#21036]
- Exposed the `desktopCapturer` module in the main process. [#23548](https://github.com/electron/electron/pull/23548)
- Can now check if a given `session` is persistent by calling the `ses.isPersistent()` API. [#22622](https://github.com/electron/electron/pull/22622)
- Resolve network issues that prevented RTC calls from being connected due to network IP address changes and ICE. (Chromium issue 1113227). [#24998](https://github.com/electron/electron/pull/24998)
See the [10.0.0 release notes](https://github.com/electron/electron/releases/tag/v10.0.0) for a full list of new features and changes.
## Breaking Changes
* Changed the default value of `enableRemoteModule` to `false`. [#22091](https://github.com/electron/electron/pull/22091)
* This is part of our plans for deprecating the `remote` module and moving it to userland. You can read and follow [this issue](https://github.com/electron/electron/issues/21408) that details our reasons for this and includes a proposed timeline for deprecation.
* Changed the default value of `app.allowRendererProcessReuse` to `true`. [#22336](https://github.com/electron/electron/pull/22336) (Also in [Electron 9](https://github.com/electron/electron/pull/22401))
* This will prevent loading of non-context-aware native modules in renderer processes.
* You can read and follow [this issue](https://github.com/electron/electron/issues/18397) that details our reasons for this and includes a proposed timeline for deprecation.
* Fixed the positioning of window buttons on macOS when the OS locale is set to an RTL language (like Arabic or Hebrew). Frameless window apps may have to account for this change while styling their windows. [#22016](https://github.com/electron/electron/pull/22016)
- Changed the default value of `enableRemoteModule` to `false`. [#22091](https://github.com/electron/electron/pull/22091)
- This is part of our plans for deprecating the `remote` module and moving it to userland. You can read and follow [this issue](https://github.com/electron/electron/issues/21408) that details our reasons for this and includes a proposed timeline for deprecation.
- Changed the default value of `app.allowRendererProcessReuse` to `true`. [#22336](https://github.com/electron/electron/pull/22336) (Also in [Electron 9](https://github.com/electron/electron/pull/22401))
- This will prevent loading of non-context-aware native modules in renderer processes.
- You can read and follow [this issue](https://github.com/electron/electron/issues/18397) that details our reasons for this and includes a proposed timeline for deprecation.
- Fixed the positioning of window buttons on macOS when the OS locale is set to an RTL language (like Arabic or Hebrew). Frameless window apps may have to account for this change while styling their windows. [#22016](https://github.com/electron/electron/pull/22016)
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* Session: Can now check if a given `session` is persistent by calling the `ses.isPersistent()` API. [#22622](https://github.com/electron/electron/pull/22622)
* Contents: Added `contents.getBackgroundThrottling()` method and `contents.backgroundThrottling` property. [#21036](https://github.com/electron/electron/pull/21036)
- Session: Can now check if a given `session` is persistent by calling the `ses.isPersistent()` API. [#22622](https://github.com/electron/electron/pull/22622)
- Contents: Added `contents.getBackgroundThrottling()` method and `contents.backgroundThrottling` property. [#21036](https://github.com/electron/electron/pull/21036)
### Deprecated APIs
The following APIs are now deprecated or removed:
* Removed the deprecated `currentlyLoggingPath` property of `netLog`. Additionally, `netLog.stopLogging` no longer returns the path to the recorded log. [#22732](https://github.com/electron/electron/pull/22732)
* Deprecated uncompressed crash uploads in `crashReporter`. [#23598](https://github.com/electron/electron/pull/23598)
- Removed the deprecated `currentlyLoggingPath` property of `netLog`. Additionally, `netLog.stopLogging` no longer returns the path to the recorded log. [#22732](https://github.com/electron/electron/pull/22732)
- Deprecated uncompressed crash uploads in `crashReporter`. [#23598](https://github.com/electron/electron/pull/23598)
## End of Support for 7.x.y
@ -76,9 +77,11 @@ In the short term, you can expect the team to continue to focus on keeping up wi
For information on planned breaking changes in upcoming versions of Electron, [see our Planned Breaking Changes doc](https://github.com/electron/electron/blob/master/docs/breaking-changes.md).
### Continued Work for Deprecation of `remote` Module (in Electron 11)
We started work to remove the remote module in [Electron 9](https://www.electronjs.org/blog/electron-9-0) and we're continuing plans to remove the `remote` module. In Electron 11, we plan to continue refactor work for implementing [WeakRef](https://v8.dev/features/weak-references) as we have done in Electron 10. Please read and follow [this issue](https://github.com/electron/electron/issues/21408) for full plans and details for deprecation.
### Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)
_Edit: Originally, this blog post stated that we would disable renderer process reuse in Electron 11. Disabling renderer process reuse has now been pushed to Electron 12._
From Electron 6 onwards, we've been laying the groundwork to require [native Node modules](https://nodejs.org/api/addons.html) loaded in the renderer process to be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12. Read [this issue](https://github.com/electron/electron/issues/18397) for full details including the proposed timeline.

Просмотреть файл

@ -7,11 +7,12 @@ authors:
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: electron-11-0
---
Electron 11.0.0 has been released! It includes upgrades to Chromium `87`, V8 `8.7`, and Node.js `12.18.3`. We've added support for Apple silicon, and general improvements. Read below for more details!
---
The Electron team is excited to announce the release of Electron 11.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new support for Apple's M1 hardware.
The Electron team is excited to announce the release of Electron 11.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new support for Apple's M1 hardware.
We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!
@ -19,35 +20,35 @@ We can't wait to see what you build with them! Continue reading for details abou
### Stack Changes
* Chromium `87.0.4280.47`
* [New in Chrome 86](https://developers.google.com/web/updates/2020/10/nic86)
* [New in Chrome 87](https://developers.google.com/web/updates/2020/11/nic87)
* Node.js `12.18.3`
* [Node 12.18.3 blog post](https://nodejs.org/en/blog/release/v12.18.3/)
* [Node 12.7.0 blog post](https://nodejs.org/en/blog/release/v12.17.0/)
* V8 `8.7`
* [V8 8.6 blog post](https://v8.dev/blog/v8-release-86)
* [V8 8.7 blog post](https://v8.dev/blog/v8-release-87)
- Chromium `87.0.4280.47`
- [New in Chrome 86](https://developers.google.com/web/updates/2020/10/nic86)
- [New in Chrome 87](https://developers.google.com/web/updates/2020/11/nic87)
- Node.js `12.18.3`
- [Node 12.18.3 blog post](https://nodejs.org/en/blog/release/v12.18.3/)
- [Node 12.7.0 blog post](https://nodejs.org/en/blog/release/v12.17.0/)
- V8 `8.7`
- [V8 8.6 blog post](https://v8.dev/blog/v8-release-86)
- [V8 8.7 blog post](https://v8.dev/blog/v8-release-87)
### Highlight Features
* Support for Apple M1: On November 10, Apple announced their [new M1 chips, which will be included in their upcoming hardware](https://www.apple.com/newsroom/2020/11/apple-unleashes-m1/). Beginning in Electron 11, Electron will be shipping separate versions of Electron for Intel Macs (x64) and Apple's upcoming M1 hardware (arm64). You can learn more about how to get your Electron app [running on Apple's M1 hardware here.](https://www.electronjs.org/blog/apple-silicon) [#24545](https://github.com/electron/electron/pull/24545)
* Added V8 crash message and location information to crashReport parameters. [#24771](https://github.com/electron/electron/pull/24771)
* Improved the performance of sending wide objects over the context bridge. [#24671](https://github.com/electron/electron/pull/24671)
- Support for Apple M1: On November 10, Apple announced their [new M1 chips, which will be included in their upcoming hardware](https://www.apple.com/newsroom/2020/11/apple-unleashes-m1/). Beginning in Electron 11, Electron will be shipping separate versions of Electron for Intel Macs (x64) and Apple's upcoming M1 hardware (arm64). You can learn more about how to get your Electron app [running on Apple's M1 hardware here.](https://www.electronjs.org/blog/apple-silicon) [#24545](https://github.com/electron/electron/pull/24545)
- Added V8 crash message and location information to crashReport parameters. [#24771](https://github.com/electron/electron/pull/24771)
- Improved the performance of sending wide objects over the context bridge. [#24671](https://github.com/electron/electron/pull/24671)
See the [11.0.0 release notes](https://github.com/electron/electron/releases/tag/v11.0.0) for a full list of new features and changes.
## Breaking Changes
* Removed experimental APIs: `BrowserView.{fromId, fromWebContents, getAllViews}` and the `id` property of `BrowserView`. [#23578](https://github.com/electron/electron/pull/23578)
- Removed experimental APIs: `BrowserView.{fromId, fromWebContents, getAllViews}` and the `id` property of `BrowserView`. [#23578](https://github.com/electron/electron/pull/23578)
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* Added `app.getApplicationInfoForProtocol()` API that returns detailed information about the app that handles a certain protocol. [#24112](https://github.com/electron/electron/pull/24112)
* Added `app.createThumbnailFromPath()` API that returns a preview image of a file given its file path and a maximum thumbnail size. [#24802](https://github.com/electron/electron/pull/24802)
* Added `webContents.forcefullyCrashRenderer()` to forcefully terminate a renderer process to assist with recovering a hung renderer. [#25756](https://github.com/electron/electron/pull/25756)
- Added `app.getApplicationInfoForProtocol()` API that returns detailed information about the app that handles a certain protocol. [#24112](https://github.com/electron/electron/pull/24112)
- Added `app.createThumbnailFromPath()` API that returns a preview image of a file given its file path and a maximum thumbnail size. [#24802](https://github.com/electron/electron/pull/24802)
- Added `webContents.forcefullyCrashRenderer()` to forcefully terminate a renderer process to assist with recovering a hung renderer. [#25756](https://github.com/electron/electron/pull/25756)
## End of Support for 8.x.y
@ -60,11 +61,13 @@ In the short term, you can expect the team to continue to focus on keeping up wi
For information on planned breaking changes in upcoming versions of Electron, [see our Planned Breaking Changes doc](https://github.com/electron/electron/blob/master/docs/breaking-changes.md).
### Continued Work for Deprecation of `remote` Module
We started work to remove the `remote` module in [Electron 9](https://www.electronjs.org/blog/electron-9-0). We plan to remove the `remote` module itself in Electron 14.
We started work to remove the `remote` module in [Electron 9](https://www.electronjs.org/blog/electron-9-0). We plan to remove the `remote` module itself in Electron 14.
Read and follow [this issue](https://github.com/electron/electron/issues/21408) for full plans and details for deprecation.
### Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)
From Electron 6 onwards, we've been laying the groundwork to require [native Node modules](https://nodejs.org/api/addons.html) loaded in the renderer process to be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12.
From Electron 6 onwards, we've been laying the groundwork to require [native Node modules](https://nodejs.org/api/addons.html) loaded in the renderer process to be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12.
Read and follow [this issue](https://github.com/electron/electron/issues/18397) for full details, including the proposed timeline.

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: electron-12-0
---
Electron 12.0.0 has been released! It includes upgrades to Chromium `89`, V8 `8.9` and Node.js `14.16`. We've added changes to the remote module, new defaults for contextIsolation, a new webFrameMain API, and general improvements. Read below for more details!
---
@ -23,90 +24,90 @@ The Electron team is excited to announce the release of Electron 12.0.0! You can
### Stack Changes
* Chromium `89`
* [New in Chrome 88](https://developer.chrome.com/blog/new-in-chrome-88/)
* [New in Chrome 89](https://developer.chrome.com/blog/new-in-chrome-89/)
* Node.js `14.16`
* [Node 14.16.0 blog post](https://nodejs.org/en/blog/release/v14.16.0/)
* [Node 14.0.0 blog post](https://nodejs.org/en/blog/release/v14.0.0/)
* V8 `8.9`
* [V8 8.8 blog post](https://v8.dev/blog/v8-release-88)
* [V8 8.9 blog post](https://v8.dev/blog/v8-release-89)
- Chromium `89`
- [New in Chrome 88](https://developer.chrome.com/blog/new-in-chrome-88/)
- [New in Chrome 89](https://developer.chrome.com/blog/new-in-chrome-89/)
- Node.js `14.16`
- [Node 14.16.0 blog post](https://nodejs.org/en/blog/release/v14.16.0/)
- [Node 14.0.0 blog post](https://nodejs.org/en/blog/release/v14.0.0/)
- V8 `8.9`
- [V8 8.8 blog post](https://v8.dev/blog/v8-release-88)
- [V8 8.9 blog post](https://v8.dev/blog/v8-release-89)
### Highlight Features
* The ContextBridge `exposeInMainWorld` method can now expose non-object APIs. [#26834](https://github.com/electron/electron/pull/26834)
* Upgraded from Node 12 to Node 14. [#23249](https://github.com/electron/electron/pull/25249)
* Added a new `webFrameMain` API for accessing sub-frames of a `WebContents` instance from the main process. [#25464](https://github.com/electron/electron/pull/25464)
* The default values of `contextIsolation` and `worldSafeExecuteJavaScript` are now `true`. [#27949](https://github.com/electron/electron/pull/27949) [#27502](https://github.com/electron/electron/pull/27502)
- The ContextBridge `exposeInMainWorld` method can now expose non-object APIs. [#26834](https://github.com/electron/electron/pull/26834)
- Upgraded from Node 12 to Node 14. [#23249](https://github.com/electron/electron/pull/25249)
- Added a new `webFrameMain` API for accessing sub-frames of a `WebContents` instance from the main process. [#25464](https://github.com/electron/electron/pull/25464)
- The default values of `contextIsolation` and `worldSafeExecuteJavaScript` are now `true`. [#27949](https://github.com/electron/electron/pull/27949) [#27502](https://github.com/electron/electron/pull/27502)
See the [12.0.0 release notes](https://github.com/electron/electron/releases/tag/v12.0.0) for a full list of new features and changes.
## Breaking Changes
* Deprecated the `remote` module. It is replaced by [`@electron/remote`](https://github.com/electron/remote). [#25293](https://github.com/electron/electron/pull/25293)
* If you are currently using the `remote` module, we've written [a guide to migrating to `@electron/remote` here.](https://github.com/electron/remote#migrating-from-remote)
* Changed the default value of `contextIsolation` to `true`. [#27949](https://github.com/electron/electron/pull/27949)
* Changed the default value of `worldSafeExecuteJavaScript` to `true`. [#27502](https://github.com/electron/electron/pull/27502)
* Changed the default of `crashReporter.start({ compress })` from `false` to `true`. [#25288](https://github.com/electron/electron/pull/25288)
* Removed Flash support: Chromium has removed support for Flash, which was also removed in Electron 12. See [Chromium's Flash Roadmap](https://www.chromium.org/flash-roadmap) for more details.
* Required SSE3 for Chrome on x86: Chromium has removed support for [older x86 CPUs that do not meet a minimum of SSE3 (Streaming SIMD Extensions 3) support](https://docs.google.com/document/d/1QUzL4MGNqX4wiLvukUwBf6FdCL35kCDoEJTm2wMkahw/edit#heading=h.7nki9mck5t64). This support was also removed in Electron 12.
- Deprecated the `remote` module. It is replaced by [`@electron/remote`](https://github.com/electron/remote). [#25293](https://github.com/electron/electron/pull/25293)
- If you are currently using the `remote` module, we've written [a guide to migrating to `@electron/remote` here.](https://github.com/electron/remote#migrating-from-remote)
- Changed the default value of `contextIsolation` to `true`. [#27949](https://github.com/electron/electron/pull/27949)
- Changed the default value of `worldSafeExecuteJavaScript` to `true`. [#27502](https://github.com/electron/electron/pull/27502)
- Changed the default of `crashReporter.start({ compress })` from `false` to `true`. [#25288](https://github.com/electron/electron/pull/25288)
- Removed Flash support: Chromium has removed support for Flash, which was also removed in Electron 12. See [Chromium's Flash Roadmap](https://www.chromium.org/flash-roadmap) for more details.
- Required SSE3 for Chrome on x86: Chromium has removed support for [older x86 CPUs that do not meet a minimum of SSE3 (Streaming SIMD Extensions 3) support](https://docs.google.com/document/d/1QUzL4MGNqX4wiLvukUwBf6FdCL35kCDoEJTm2wMkahw/edit#heading=h.7nki9mck5t64). This support was also removed in Electron 12.
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* Added `webFrameMain` API: The `webFrameMain` module can be used to look up frames across existing [`WebContents`](https://www.electronjs.org/docs/api/web-contents.md) instances. This is the main process equivalent of the existing webFrame API. More information about this new API can be found [here](https://github.com/electron/electron/pull/25464), and in our [documentation](https://www.electronjs.org/docs/api/web-frame-main).
* `app` API changes:
* Added non-localized `serviceName` to `'child-process-gone'` / `app.getAppMetrics()`. [#25975](https://github.com/electron/electron/pull/25975)
* Added new `app.runningUnderRosettaTranslation` property to detect when running under rosetta on Apple silicon. [#26444](https://github.com/electron/electron/pull/26444)
* Added `exitCode` to `render-process-gone` details (app & webContents). [#27677](https://github.com/electron/electron/pull/27677)
* `BrowserWindow` API changes:
* Added `BrowserWindow.isTabletMode()` API. [#25209](https://github.com/electron/electron/pull/25209)
* Added `resized` (Windows/macOS) and `moved` (Windows) events to `BrowserWindow`. [#26216](https://github.com/electron/electron/pull/26216)
* Added new `system-context-menu` event to allow preventing and overriding the system context menu. [#25795](https://github.com/electron/electron/pull/25795)
* Added `win.setTopBrowserView()` so that `BrowserView`s can be raised. [#27713](https://github.com/electron/electron/pull/27713)
* Added `webPreferences.preferredSizeMode` to allow sizing views according to their document's minimum size. [#25874](https://github.com/electron/electron/pull/25874)
* `contextBridge` API changes:
* Allowed ContextBridge `exposeInMainWorld` method to expose non-object APIs. [#26834](https://github.com/electron/electron/pull/26834)
* `display` API changes:
* Added `displayFrequency` property to the `Display` object to allow getting information about the refresh rate on Windows. [#26472](https://github.com/electron/electron/pull/26472)
* `extensions` API changes:
* Added support for some `chrome.management` APIs. [#25098](https://github.com/electron/electron/pull/25098)
* `MenuItem` API changes:
* Added support for showing macOS share menu. [#25629](https://github.com/electron/electron/pull/25629)
* `net` API changes:
* Added a new `credentials` option for `net.request()`. [#25284](https://github.com/electron/electron/pull/25284)
* Added `net.online` for detecting whether there is currently internet connection. [#21004](https://github.com/electron/electron/pull/21004)
* `powerMonitor` API changes:
* Added `powerMonitor.onBatteryPower`. [#26494](https://github.com/electron/electron/pull/26494)
* Added fast user switching event to powerMonitor on macOS. [#25321](https://github.com/electron/electron/pull/25321)
* `session` API changes:
* Added `allowFileAccess` option to `ses.loadExtension()` API. [#27702](https://github.com/electron/electron/pull/27702)
* Added `display-capture` API for `session.setPermissionRequestHandler`. [#27696](https://github.com/electron/electron/pull/27696)
* Added a `disabledCipherSuites` option to `session.setSSLConfig`. [#25818](https://github.com/electron/electron/pull/25818)
* Added `extension-loaded`, `extension-unloaded`, and `extension-ready` events to `session`. [#25385](https://github.com/electron/electron/pull/25385)
* Added `session.setSSLConfig()` to allow configuring SSL. [#25461](https://github.com/electron/electron/pull/25461)
* Added support for explicitly specifying `direct`, `auto_detect` or `system` modes in `session.setProxy()`. [#24937](https://github.com/electron/electron/pull/24937)
* Added [Serial API](https://web.dev/serial/) support. [#25237](https://github.com/electron/electron/pull/25237)
* Added APIs to enable/disable spell checker. [#26276](https://github.com/electron/electron/pull/26276)
* `shell` API changes:
* Added a new asynchronous `shell.trashItem()` API, replacing the synchronous `shell.moveItemToTrash()`. [#25114](https://github.com/electron/electron/pull/25114)
* `webContents` API changes:
* Added a small console hint to console to help debug renderer crashes. [#25317](https://github.com/electron/electron/pull/25317)
* Added `frame` and `webContents` properties to the details object in webRequest handlers. [#27334](https://github.com/electron/electron/pull/27334)
* Added `webContents.forcefullyCrashRenderer()` to forcefully terminate a renderer process to assist with recovering a hung renderer. [#25580](https://github.com/electron/electron/pull/25580)
* Added `setWindowOpenHandler` API for renderer-created child windows, and deprecate `new-window` event. [#24517](https://github.com/electron/electron/pull/24517)
* `webFrame` API changes:
* Added spellcheck API to renderer. [#25060](https://github.com/electron/electron/pull/25060)
- Added `webFrameMain` API: The `webFrameMain` module can be used to look up frames across existing [`WebContents`](https://www.electronjs.org/docs/api/web-contents.md) instances. This is the main process equivalent of the existing webFrame API. More information about this new API can be found [here](https://github.com/electron/electron/pull/25464), and in our [documentation](https://www.electronjs.org/docs/api/web-frame-main).
- `app` API changes:
- Added non-localized `serviceName` to `'child-process-gone'` / `app.getAppMetrics()`. [#25975](https://github.com/electron/electron/pull/25975)
- Added new `app.runningUnderRosettaTranslation` property to detect when running under rosetta on Apple silicon. [#26444](https://github.com/electron/electron/pull/26444)
- Added `exitCode` to `render-process-gone` details (app & webContents). [#27677](https://github.com/electron/electron/pull/27677)
- `BrowserWindow` API changes:
- Added `BrowserWindow.isTabletMode()` API. [#25209](https://github.com/electron/electron/pull/25209)
- Added `resized` (Windows/macOS) and `moved` (Windows) events to `BrowserWindow`. [#26216](https://github.com/electron/electron/pull/26216)
- Added new `system-context-menu` event to allow preventing and overriding the system context menu. [#25795](https://github.com/electron/electron/pull/25795)
- Added `win.setTopBrowserView()` so that `BrowserView`s can be raised. [#27713](https://github.com/electron/electron/pull/27713)
- Added `webPreferences.preferredSizeMode` to allow sizing views according to their document's minimum size. [#25874](https://github.com/electron/electron/pull/25874)
- `contextBridge` API changes:
- Allowed ContextBridge `exposeInMainWorld` method to expose non-object APIs. [#26834](https://github.com/electron/electron/pull/26834)
- `display` API changes:
- Added `displayFrequency` property to the `Display` object to allow getting information about the refresh rate on Windows. [#26472](https://github.com/electron/electron/pull/26472)
- `extensions` API changes:
- Added support for some `chrome.management` APIs. [#25098](https://github.com/electron/electron/pull/25098)
- `MenuItem` API changes:
- Added support for showing macOS share menu. [#25629](https://github.com/electron/electron/pull/25629)
- `net` API changes:
- Added a new `credentials` option for `net.request()`. [#25284](https://github.com/electron/electron/pull/25284)
- Added `net.online` for detecting whether there is currently internet connection. [#21004](https://github.com/electron/electron/pull/21004)
- `powerMonitor` API changes:
- Added `powerMonitor.onBatteryPower`. [#26494](https://github.com/electron/electron/pull/26494)
- Added fast user switching event to powerMonitor on macOS. [#25321](https://github.com/electron/electron/pull/25321)
- `session` API changes:
- Added `allowFileAccess` option to `ses.loadExtension()` API. [#27702](https://github.com/electron/electron/pull/27702)
- Added `display-capture` API for `session.setPermissionRequestHandler`. [#27696](https://github.com/electron/electron/pull/27696)
- Added a `disabledCipherSuites` option to `session.setSSLConfig`. [#25818](https://github.com/electron/electron/pull/25818)
- Added `extension-loaded`, `extension-unloaded`, and `extension-ready` events to `session`. [#25385](https://github.com/electron/electron/pull/25385)
- Added `session.setSSLConfig()` to allow configuring SSL. [#25461](https://github.com/electron/electron/pull/25461)
- Added support for explicitly specifying `direct`, `auto_detect` or `system` modes in `session.setProxy()`. [#24937](https://github.com/electron/electron/pull/24937)
- Added [Serial API](https://web.dev/serial/) support. [#25237](https://github.com/electron/electron/pull/25237)
- Added APIs to enable/disable spell checker. [#26276](https://github.com/electron/electron/pull/26276)
- `shell` API changes:
- Added a new asynchronous `shell.trashItem()` API, replacing the synchronous `shell.moveItemToTrash()`. [#25114](https://github.com/electron/electron/pull/25114)
- `webContents` API changes:
- Added a small console hint to console to help debug renderer crashes. [#25317](https://github.com/electron/electron/pull/25317)
- Added `frame` and `webContents` properties to the details object in webRequest handlers. [#27334](https://github.com/electron/electron/pull/27334)
- Added `webContents.forcefullyCrashRenderer()` to forcefully terminate a renderer process to assist with recovering a hung renderer. [#25580](https://github.com/electron/electron/pull/25580)
- Added `setWindowOpenHandler` API for renderer-created child windows, and deprecate `new-window` event. [#24517](https://github.com/electron/electron/pull/24517)
- `webFrame` API changes:
- Added spellcheck API to renderer. [#25060](https://github.com/electron/electron/pull/25060)
### Removed/Deprecated Changes
The following APIs have been removed or are now deprecated:
* Deprecated the `remote` module. It is replaced by [`@electron/remote`](https://github.com/electron/remote). [#25293](https://github.com/electron/electron/pull/25293)
* Removed deprecated `crashReporter` APIs. [#26709](https://github.com/electron/electron/pull/26709)
* Removed links to the Electron website from the default 'Help' menu in packaged apps. [#25831](https://github.com/electron/electron/pull/25831)
- Deprecated the `remote` module. It is replaced by [`@electron/remote`](https://github.com/electron/remote). [#25293](https://github.com/electron/electron/pull/25293)
- Removed deprecated `crashReporter` APIs. [#26709](https://github.com/electron/electron/pull/26709)
- Removed links to the Electron website from the default 'Help' menu in packaged apps. [#25831](https://github.com/electron/electron/pull/25831)
## End of Support for 9.x.y

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: electron-13-0
---
Electron 13.0.0 has been released! It includes upgrades to Chromium `91` and V8 `9.1`. We've added several API updates, bug fixes, and general improvements. Read below for more details!
---
@ -23,74 +24,74 @@ The Electron team is excited to announce the release of Electron 13.0.0! You can
### Stack Changes
* Chromium `91`
* [New in Chrome 91](https://developer.chrome.com/blog/new-in-chrome-91/)
* [New in Chrome 90](https://developer.chrome.com/blog/new-in-chrome-90/)
* Node.js `14.16.0`
* [Node 14.16.0 blog post](https://nodejs.org/en/blog/release/v14.16.0/)
* [Node 14.0.0 blog post](https://nodejs.org/en/blog/release/v14.0.0/)
* V8 `9.1`
* [V8 9.1 blog post](https://v8.dev/blog/v8-release-91)
* [V8 9.0 blog post](https://v8.dev/blog/v8-release-90)
- Chromium `91`
- [New in Chrome 91](https://developer.chrome.com/blog/new-in-chrome-91/)
- [New in Chrome 90](https://developer.chrome.com/blog/new-in-chrome-90/)
- Node.js `14.16.0`
- [Node 14.16.0 blog post](https://nodejs.org/en/blog/release/v14.16.0/)
- [Node 14.0.0 blog post](https://nodejs.org/en/blog/release/v14.0.0/)
- V8 `9.1`
- [V8 9.1 blog post](https://v8.dev/blog/v8-release-91)
- [V8 9.0 blog post](https://v8.dev/blog/v8-release-90)
### Highlight Features
* Added `process.contextIsolated` property that indicates whether the current renderer context has `contextIsolation` enabled. [#28252](https://github.com/electron/electron/pull/28252)
* Added new `session.storagePath` API to get the path on disk for session-specific data. [#28866](https://github.com/electron/electron/pull/28866)
* Deprecated the `new-window` event of `WebContents`. It is replaced by `webContents.setWindowOpenHandler()`
* Added `process.contextId` used by `@electron/remote`. [#28251](https://github.com/electron/electron/pull/28251)
- Added `process.contextIsolated` property that indicates whether the current renderer context has `contextIsolation` enabled. [#28252](https://github.com/electron/electron/pull/28252)
- Added new `session.storagePath` API to get the path on disk for session-specific data. [#28866](https://github.com/electron/electron/pull/28866)
- Deprecated the `new-window` event of `WebContents`. It is replaced by `webContents.setWindowOpenHandler()`
- Added `process.contextId` used by `@electron/remote`. [#28251](https://github.com/electron/electron/pull/28251)
See the [13.0.0 release notes](https://github.com/electron/electron/releases/tag/v13.0.0) for a full list of new features and changes.
## Breaking Changes
* `window.open()` parameter frameName is no longer set as window title. [#27481](https://github.com/electron/electron/pull/27481)
* Changed `session.setPermissionCheckHandler(handler)` to allow for `handler`'s first parameter, `webContents` to be `null`. [#19903](https://github.com/electron/electron/pull/19903)
- `window.open()` parameter frameName is no longer set as window title. [#27481](https://github.com/electron/electron/pull/27481)
- Changed `session.setPermissionCheckHandler(handler)` to allow for `handler`'s first parameter, `webContents` to be `null`. [#19903](https://github.com/electron/electron/pull/19903)
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* Added `roundedCorners` option for `BrowserWindow`. [#27572](https://github.com/electron/electron/pull/27572)
* Added new `session.storagePath` API to get the path on disk for session-specific data.[28866](https://github.com/electron/electron/pull/28866)
* Added support for passing DOM elements over the context bridge. [#26776](https://github.com/electron/electron/pull/26776)
* Added `process.uptime()` to sandboxed renderers. [#26684](https://github.com/electron/electron/pull/26684)
* Added missing fields to the parameters emitted as part of the `context-menu `event.[#26788](https://github.com/electron/electron/pull/26788)
* Added support for registering Manifest V3 extension service workers.
* Added registration-completed event to ServiceWorkers. [#27562](https://github.com/electron/electron/pull/27562)
- Added `roundedCorners` option for `BrowserWindow`. [#27572](https://github.com/electron/electron/pull/27572)
- Added new `session.storagePath` API to get the path on disk for session-specific data.[28866](https://github.com/electron/electron/pull/28866)
- Added support for passing DOM elements over the context bridge. [#26776](https://github.com/electron/electron/pull/26776)
- Added `process.uptime()` to sandboxed renderers. [#26684](https://github.com/electron/electron/pull/26684)
- Added missing fields to the parameters emitted as part of the `context-menu `event.[#26788](https://github.com/electron/electron/pull/26788)
- Added support for registering Manifest V3 extension service workers.
- Added registration-completed event to ServiceWorkers. [#27562](https://github.com/electron/electron/pull/27562)
### Removed/Deprecated Changes
The following APIs have been removed or are now deprecated:
* Deprecated the `new-window` event of `WebContents`. It is replaced by `webContents.setWindowOpenHandler()`
* Removed deprecated `shell.moveItemToTrash()`. [#26723](https://github.com/electron/electron/pull/26723)
* Removed the following deprecated `BrowserWindow` extension APIs:
- Deprecated the `new-window` event of `WebContents`. It is replaced by `webContents.setWindowOpenHandler()`
- Removed deprecated `shell.moveItemToTrash()`. [#26723](https://github.com/electron/electron/pull/26723)
- Removed the following deprecated `BrowserWindow` extension APIs:
* `BrowserWindow.addExtension(path)`
* `BrowserWindow.addDevToolsExtension(path)`
* `BrowserWindow.removeExtension(name)`
* `BrowserWindow.removeDevToolsExtension(name)`
* `BrowserWindow.getExtensions()`
* `BrowserWindow.getDevToolsExtensions()`
- `BrowserWindow.addExtension(path)`
- `BrowserWindow.addDevToolsExtension(path)`
- `BrowserWindow.removeExtension(name)`
- `BrowserWindow.removeDevToolsExtension(name)`
- `BrowserWindow.getExtensions()`
- `BrowserWindow.getDevToolsExtensions()`
Use the `session` APIs instead:
Use the `session` APIs instead:
* `ses.loadExtension(path)`
* `ses.removeExtension(extension_id)`
* `ses.getAllExtensions()`
- `ses.loadExtension(path)`
- `ses.removeExtension(extension_id)`
- `ses.getAllExtensions()`
* The following `systemPreferences` methods have been deprecated:
- The following `systemPreferences` methods have been deprecated:
* `systemPreferences.isDarkMode()`
* `systemPreferences.isInvertedColorScheme()`
* `systemPreferences.isHighContrastColorScheme()`
- `systemPreferences.isDarkMode()`
- `systemPreferences.isInvertedColorScheme()`
- `systemPreferences.isHighContrastColorScheme()`
Use the following `nativeTheme` properties instead:
Use the following `nativeTheme` properties instead:
* `nativeTheme.shouldUseDarkColors`
* `nativeTheme.shouldUseInvertedColorScheme`
* `nativeTheme.shouldUseHighContrastColors`
- `nativeTheme.shouldUseDarkColors`
- `nativeTheme.shouldUseInvertedColorScheme`
- `nativeTheme.shouldUseHighContrastColors`
## End of Support for 10.x.y

Просмотреть файл

@ -31,7 +31,6 @@ Beginning in September 2021 with Electron 15, Electron will release a new major
stable version every 8 weeks. You can read the [full details here](https://www.electronjs.org/blog/8-week-cadence).
Electron 15 will begin beta on September 1, 2021 and stable release will be on
September 21, 2021. You can find [Electron's public timeline here](https://electronjs.org/docs/tutorial/electron-timelines).
Additionally, Electron will be changing supported versions from latest three
versions to latest four versions until May 2022. See
[see our versioning document](https://electronjs.org/docs/tutorial/electron-versioning)
@ -39,22 +38,22 @@ for more detailed information about versioning in Electron.
### Stack Changes
* Chromium `93`
* [New in Chrome 93](https://developer.chrome.com/blog/new-in-chrome-93/)
* [New in Chrome 92](https://www.chromestatus.com/features#milestone%3D92)
* Node.js `14.17.0`
* [Node 14.17.0 blog post](https://nodejs.org/en/blog/release/v14.17.0/)
* V8 `9.3`
* [V8 9.3 blog post](https://v8.dev/blog/v8-release-93)
* [V8 9.2 blog post](https://v8.dev/blog/v8-release-92)
- Chromium `93`
- [New in Chrome 93](https://developer.chrome.com/blog/new-in-chrome-93/)
- [New in Chrome 92](https://www.chromestatus.com/features#milestone%3D92)
- Node.js `14.17.0`
- [Node 14.17.0 blog post](https://nodejs.org/en/blog/release/v14.17.0/)
- V8 `9.3`
- [V8 9.3 blog post](https://v8.dev/blog/v8-release-93)
- [V8 9.2 blog post](https://v8.dev/blog/v8-release-92)
### Highlight Features
* Default Changed: `nativeWindowOpen` now defaults to `true`. [(see docs)](https://www.electronjs.org/docs/api/window-open.md)
* Child windows no longer inherit BrowserWindow construction options from their parents. [#28550](https://github.com/electron/electron/pull/28550)
* Added new `session.storagePath` API to get the path on disk for session-specific data. [#28665](https://github.com/electron/electron/pull/28665)
* Added `process.contextId` used by `@electron/remote`. [#28007](https://github.com/electron/electron/pull/28007)
* Added experimental cookie encryption support behind an [Electron Fuse](https://www.electronjs.org/docs/tutorial/fuses). [#29492](https://github.com/electron/electron/pull/29492)
- Default Changed: `nativeWindowOpen` now defaults to `true`. [(see docs)](https://www.electronjs.org/docs/api/window-open.md)
- Child windows no longer inherit BrowserWindow construction options from their parents. [#28550](https://github.com/electron/electron/pull/28550)
- Added new `session.storagePath` API to get the path on disk for session-specific data. [#28665](https://github.com/electron/electron/pull/28665)
- Added `process.contextId` used by `@electron/remote`. [#28007](https://github.com/electron/electron/pull/28007)
- Added experimental cookie encryption support behind an [Electron Fuse](https://www.electronjs.org/docs/tutorial/fuses). [#29492](https://github.com/electron/electron/pull/29492)
See the [14.0.0 release notes](https://github.com/electron/electron/releases/tag/v14.0.0) for a full list of new features and changes.
@ -124,9 +123,9 @@ webContents.setWindowOpenHandler((details) => {
action: 'allow',
overrideBrowserWindowOptions: {
// ...
}
}
})
},
};
});
```
### Removed: `additionalFeatures`
@ -145,14 +144,14 @@ webContents.on('did-create-window', (window, details) => {
if (details.additionalFeatures.includes('my-key')) {
// ...
}
})
});
// Replace with
webContents.on('did-create-window', (window, details) => {
if (details.options['my-key']) {
// ...
}
})
});
```
### Removed: `remote` module
@ -165,31 +164,29 @@ they were available in the renderer process. This is a direct replacement for
the `remote` module. See the [module's readme](https://github.com/electron/remote/blob/main/README.md)
for migration instructions and reference.
## API Changes
* Added `BrowserWindow.isFocusable()` method to determine whether a window is focusable. [#28642](https://github.com/electron/electron/pull/28642)
* Added `WebFrameMain.visibilityState` instance property. [#28706](https://github.com/electron/electron/pull/28706)
* Added `disposition`, `referrer` and `postBody` to the details object passed to the window open handler registered with `setWindowOpenHandler`. [#28518](https://github.com/electron/electron/pull/28518)
* Added `process.contextId` used by `@electron/remote`. [#28007](https://github.com/electron/electron/pull/28007)
* Added experimental cookie encryption support behind an [Electron Fuse](https://www.electronjs.org/docs/tutorial/fuses). [#29492](https://github.com/electron/electron/pull/29492)
* Added missing `resourceType` conversions for `webRequest` listener details: `font`, `ping`, `cspReport`, `media`, `webSocket`. [#30050](https://github.com/electron/electron/pull/30050)
* Added new `session.storagePath` API to get the path on disk for session-specific data. [#28665](https://github.com/electron/electron/pull/28665)
* Added support for Windows Control Overlay on macOS. [#29986](https://github.com/electron/electron/pull/29986)
* Added support for directing Chromium logging to a file with `--log-file=.../path/to/file.log`. Also, it's now possible to enable logging from JavaScript by appending command-line switches during the first JS tick. [#29963](https://github.com/electron/electron/pull/29963)
* Added support for the des-ede3 cipher in node crypto. [#27897](https://github.com/electron/electron/pull/27897)
* Added a `ContextBridgeMutability` feature that allows context bridge objects to be mutated. [#27348](https://github.com/electron/electron/pull/27348)
- Added `BrowserWindow.isFocusable()` method to determine whether a window is focusable. [#28642](https://github.com/electron/electron/pull/28642)
- Added `WebFrameMain.visibilityState` instance property. [#28706](https://github.com/electron/electron/pull/28706)
- Added `disposition`, `referrer` and `postBody` to the details object passed to the window open handler registered with `setWindowOpenHandler`. [#28518](https://github.com/electron/electron/pull/28518)
- Added `process.contextId` used by `@electron/remote`. [#28007](https://github.com/electron/electron/pull/28007)
- Added experimental cookie encryption support behind an [Electron Fuse](https://www.electronjs.org/docs/tutorial/fuses). [#29492](https://github.com/electron/electron/pull/29492)
- Added missing `resourceType` conversions for `webRequest` listener details: `font`, `ping`, `cspReport`, `media`, `webSocket`. [#30050](https://github.com/electron/electron/pull/30050)
- Added new `session.storagePath` API to get the path on disk for session-specific data. [#28665](https://github.com/electron/electron/pull/28665)
- Added support for Windows Control Overlay on macOS. [#29986](https://github.com/electron/electron/pull/29986)
- Added support for directing Chromium logging to a file with `--log-file=.../path/to/file.log`. Also, it's now possible to enable logging from JavaScript by appending command-line switches during the first JS tick. [#29963](https://github.com/electron/electron/pull/29963)
- Added support for the des-ede3 cipher in node crypto. [#27897](https://github.com/electron/electron/pull/27897)
- Added a `ContextBridgeMutability` feature that allows context bridge objects to be mutated. [#27348](https://github.com/electron/electron/pull/27348)
### Removed/Deprecated Changes
The following APIs have been removed or are now deprecated:
* The `remote` module has been removed after being deprecated in Electron 12. [#25734](https://github.com/electron/electron/pull/25734)
* Child windows no longer inherit BrowserWindow construction options from their parents. [#28550](https://github.com/electron/electron/pull/28550)
* Removed deprecated `additionalFeatures` property from `new-window` and `did-create-window` WebContents events. [#28548](https://github.com/electron/electron/pull/28548)
* Removed the deprecated `app.allowRendererProcessReuse` and BrowserWindow `affinity` options. [#26874](https://github.com/electron/electron/pull/26874)
* The `submitURL` option for `crashReporter.start` is no longer a required argument when `uploadToServer` is false. [#28105](https://github.com/electron/electron/pull/28105)
- The `remote` module has been removed after being deprecated in Electron 12. [#25734](https://github.com/electron/electron/pull/25734)
- Child windows no longer inherit BrowserWindow construction options from their parents. [#28550](https://github.com/electron/electron/pull/28550)
- Removed deprecated `additionalFeatures` property from `new-window` and `did-create-window` WebContents events. [#28548](https://github.com/electron/electron/pull/28548)
- Removed the deprecated `app.allowRendererProcessReuse` and BrowserWindow `affinity` options. [#26874](https://github.com/electron/electron/pull/26874)
- The `submitURL` option for `crashReporter.start` is no longer a required argument when `uploadToServer` is false. [#28105](https://github.com/electron/electron/pull/28105)
## End of Support for 11.x.y

Просмотреть файл

@ -27,19 +27,19 @@ Additionally, Electron will be changing supported versions from latest three ver
### Stack Changes
* Chromium `94`
* [New in Chrome 94](https://developer.chrome.com/blog/new-in-chrome-94/)
* Node.js `16.5.0`
* [Node 16.5.0 blog post](https://nodejs.org/en/blog/release/v16.5.0/)
* V8 `9.4`
* [V8 9.4 blog post](https://v8.dev/blog/v8-release-94)
- Chromium `94`
- [New in Chrome 94](https://developer.chrome.com/blog/new-in-chrome-94/)
- Node.js `16.5.0`
- [Node 16.5.0 blog post](https://nodejs.org/en/blog/release/v16.5.0/)
- V8 `9.4`
- [V8 9.4 blog post](https://v8.dev/blog/v8-release-94)
### Highlight Features
* `nativeWindowOpen: true` is no longer experimental, and is now the default.
* Added `safeStorage` string encryption API. [#30430](https://github.com/electron/electron/pull/30430)
* Added 'frame-created' event to `WebContents` which emits when a frame is created in the page. [#30801](https://github.com/electron/electron/pull/30801)
* Added resize `edge` info to `BrowserWindow`'s `will-resize` event. [#29199](https://github.com/electron/electron/pull/29199)
- `nativeWindowOpen: true` is no longer experimental, and is now the default.
- Added `safeStorage` string encryption API. [#30430](https://github.com/electron/electron/pull/30430)
- Added 'frame-created' event to `WebContents` which emits when a frame is created in the page. [#30801](https://github.com/electron/electron/pull/30801)
- Added resize `edge` info to `BrowserWindow`'s `will-resize` event. [#29199](https://github.com/electron/electron/pull/29199)
See the [15.0.0 release notes](https://github.com/electron/electron/releases/tag/v15.0.0) for a full list of new features and changes.
@ -53,19 +53,17 @@ Prior to Electron 15, `window.open` was by default shimmed to use `BrowserWindow
See the documentation for [window.open](https://www.electronjs.org/docs/latest/api/window-open) in Electron for more details.
## API Changes
* Added 'frame-created' event to `WebContents` which emits when a frame is created in the page. [#30801](https://github.com/electron/electron/pull/30801)
* Added `safeStorage` string encryption API. [#30430](https://github.com/electron/electron/pull/30430)
* Added `signal` option to `dialog.showMessageBox`. [#26102](https://github.com/electron/electron/pull/26102)
* Added an [Electron Fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) for enforcing code signatures on the `app.asar` file your application loads. Requires the latest `asar` module (v3.1.0 or higher). [#30900](https://github.com/electron/electron/pull/30900)
* Added fuses to disable `NODE_OPTIONS` and `--inspect` debug arguments in packaged apps. [#30420](https://github.com/electron/electron/pull/30420)
* Added new `MenuItem.userAccelerator` property to read user-assigned macOS accelerator overrides. [#26682](https://github.com/electron/electron/pull/26682)
* Added new `app.runningUnderARM64Translation` property to detect when running under Rosetta on Apple Silicon, or WOW on Windows for ARM. [#29168](https://github.com/electron/electron/pull/29168)
* Added new `imageAnimationPolicy` web preference to control how images are animated. [#29095](https://github.com/electron/electron/pull/29095)
* Added support for sending Blobs over the context bridge. [#29247](https://github.com/electron/electron/pull/29247)
- Added 'frame-created' event to `WebContents` which emits when a frame is created in the page. [#30801](https://github.com/electron/electron/pull/30801)
- Added `safeStorage` string encryption API. [#30430](https://github.com/electron/electron/pull/30430)
- Added `signal` option to `dialog.showMessageBox`. [#26102](https://github.com/electron/electron/pull/26102)
- Added an [Electron Fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) for enforcing code signatures on the `app.asar` file your application loads. Requires the latest `asar` module (v3.1.0 or higher). [#30900](https://github.com/electron/electron/pull/30900)
- Added fuses to disable `NODE_OPTIONS` and `--inspect` debug arguments in packaged apps. [#30420](https://github.com/electron/electron/pull/30420)
- Added new `MenuItem.userAccelerator` property to read user-assigned macOS accelerator overrides. [#26682](https://github.com/electron/electron/pull/26682)
- Added new `app.runningUnderARM64Translation` property to detect when running under Rosetta on Apple Silicon, or WOW on Windows for ARM. [#29168](https://github.com/electron/electron/pull/29168)
- Added new `imageAnimationPolicy` web preference to control how images are animated. [#29095](https://github.com/electron/electron/pull/29095)
- Added support for sending Blobs over the context bridge. [#29247](https://github.com/electron/electron/pull/29247)
### Removed/Deprecated Changes
@ -77,12 +75,12 @@ Starting in Electron 15, we will change supported versions from latest three ver
Developers and applications are encouraged to upgrade to a newer version of Electron.
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ---- | ---- | ---- | ---- | ---- |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## What's Next

Просмотреть файл

@ -2,14 +2,13 @@
title: Electron 16.0.0
date: 2021-11-16T00:00:00.000Z
authors:
- name: sofianguy
url: 'https://github.com/sofianguy'
image_url: 'https://github.com/sofianguy.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
- name: sofianguy
url: 'https://github.com/sofianguy'
image_url: 'https://github.com/sofianguy.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
slug: electron-16-0
---
Electron 16.0.0 has been released! It includes upgrades to Chromium `96`, V8 `9.6`, and Node.js `16.9.1`. Read below for more details!
@ -28,19 +27,19 @@ Additionally, Electron has changed supported versions from latest three versions
### Stack Changes
* Chromium `96`
* [New in Chrome 96](https://developer.chrome.com/blog/new-in-chrome-96/)
* Node.js `16.9.1`
* [Node 16.9.1 blog post](https://nodejs.org/en/blog/release/v16.9.1/)
* V8 `9.6`
* [V8 9.6 blog post](https://v8.dev/blog/v8-release-96)
- Chromium `96`
- [New in Chrome 96](https://developer.chrome.com/blog/new-in-chrome-96/)
- Node.js `16.9.1`
- [Node 16.9.1 blog post](https://nodejs.org/en/blog/release/v16.9.1/)
- V8 `9.6`
- [V8 9.6 blog post](https://v8.dev/blog/v8-release-96)
### Highlighted Features
* Now supports the [WebHID](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API) API. [#30213](https://github.com/electron/electron/pull/30213)
* Add data parameter to `app.requestSingleInstanceLock` to share data between instances. [#30891](https://github.com/electron/electron/pull/30891)
* Pass securityOrigin to media permissions request handler. [#31357](https://github.com/electron/electron/pull/31357)
* Add `commandLine.removeSwitch`. [#30933](https://github.com/electron/electron/pull/30933)
- Now supports the [WebHID](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API) API. [#30213](https://github.com/electron/electron/pull/30213)
- Add data parameter to `app.requestSingleInstanceLock` to share data between instances. [#30891](https://github.com/electron/electron/pull/30891)
- Pass securityOrigin to media permissions request handler. [#31357](https://github.com/electron/electron/pull/31357)
- Add `commandLine.removeSwitch`. [#30933](https://github.com/electron/electron/pull/30933)
See the [16.0.0 release notes](https://github.com/electron/electron/releases/tag/v16.0.0) for a full list of new features and changes.
@ -64,7 +63,7 @@ There were no API changes in Electron 16.
### Removed/Deprecated Changes
* Usage of the `desktopCapturer.getSources` API in the renderer has been deprecated and will be removed. This change improves the default security of Electron apps. See [here](https://raw.githubusercontent.com/electron/electron/main/docs/breaking-changes.md#removed-desktopcapturergetsources-in-the-renderer) for details on how to replace this API in your app.
- Usage of the `desktopCapturer.getSources` API in the renderer has been deprecated and will be removed. This change improves the default security of Electron apps. See [here](https://raw.githubusercontent.com/electron/electron/main/docs/breaking-changes.md#removed-desktopcapturergetsources-in-the-renderer) for details on how to replace this API in your app.
## End of Support for 12.x.y
@ -72,12 +71,12 @@ Electron 12.x.y has reached end-of-support as per the project's [support policy]
As of Electron 15, we have changed supported versions from latest three versions to latest four versions until May 2022 with Electron 19. After Electron 19, we will return to supporting the latest three versions. This version support change is part of our new cadence change. Please see [our blog post for full details here](https://www.electronjs.org/blog/8-week-cadence/#-will-electron-extend-the-number-of-supported-versions).
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ---- | ---- | ---- | ---- | ---- |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## What's Next

Просмотреть файл

@ -2,14 +2,13 @@
title: Electron 17.0.0
date: 2022-02-01T00:00:00.000Z
authors:
- name: mlaurencin
url: 'https://github.com/mlaurencin'
image_url: 'https://github.com/mlaurencin.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
- name: mlaurencin
url: 'https://github.com/mlaurencin'
image_url: 'https://github.com/mlaurencin.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: electron-17-0
---
Electron 17.0.0 has been released! It includes upgrades to Chromium `98`, V8 `9.8`, and Node.js `16.13.0`. Read below for more details!
@ -28,17 +27,17 @@ Additionally, Electron has changed supported versions from latest three versions
### Stack Changes
* Chromium `98`
* [New in Chrome 98](https://developer.chrome.com/blog/new-in-chrome-98/)
* Node.js `16.13.0`
* [Node 16.13.0 blog post](https://nodejs.org/en/blog/release/v16.13.0/)
* V8 `9.8`
- Chromium `98`
- [New in Chrome 98](https://developer.chrome.com/blog/new-in-chrome-98/)
- Node.js `16.13.0`
- [Node 16.13.0 blog post](https://nodejs.org/en/blog/release/v16.13.0/)
- V8 `9.8`
### Highlighted Features
* Added `webContents.getMediaSourceId()`, can be used with `getUserMedia` to get a stream for a WebContents. [#31204](https://github.com/electron/electron/pull/31204)
* Deprecates `webContents.getPrinters()` and introduces `webContents.getPrintersAsync()`. [#31023](https://github.com/electron/electron/pull/31023)
* `desktopCapturer.getSources` is now only available in the main process. [#30720](https://github.com/electron/electron/pull/30720)
- Added `webContents.getMediaSourceId()`, can be used with `getUserMedia` to get a stream for a WebContents. [#31204](https://github.com/electron/electron/pull/31204)
- Deprecates `webContents.getPrinters()` and introduces `webContents.getPrintersAsync()`. [#31023](https://github.com/electron/electron/pull/31023)
- `desktopCapturer.getSources` is now only available in the main process. [#30720](https://github.com/electron/electron/pull/30720)
See the [17.0.0 release notes](https://github.com/electron/electron/releases/tag/v17.0.0) for a full list of new features and changes.
@ -52,11 +51,11 @@ The desktopCapturer.getSources API is now only available in the main process. Th
### API Changes
There were no API changes in Electron 17.
There were no API changes in Electron 17.
### Removed/Deprecated Changes
* Usage of the `desktopCapturer.getSources` API in the renderer has been removed. See [here](https://raw.githubusercontent.com/electron/electron/main/docs/breaking-changes.md#removed-desktopcapturergetsources-in-the-renderer) for details on how to replace this API in your app.
- Usage of the `desktopCapturer.getSources` API in the renderer has been removed. See [here](https://raw.githubusercontent.com/electron/electron/main/docs/breaking-changes.md#removed-desktopcapturergetsources-in-the-renderer) for details on how to replace this API in your app.
## End of Support for 13.x.y
@ -64,12 +63,12 @@ Electron 13.x.y has reached end-of-support as per the project's [support policy]
As of Electron 15, we have changed supported versions from latest three versions to latest four versions until May 2022 with Electron 19. After Electron 19, we will return to supporting the latest three versions. This version support change is part of our new cadence change. Please see [our blog post for full details here](https://www.electronjs.org/blog/8-week-cadence/#-will-electron-extend-the-number-of-supported-versions).
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ---- | ---- | ---- | ---- | ---- |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## What's Next

Просмотреть файл

@ -2,14 +2,13 @@
title: Electron 18.0.0
date: 2022-03-29T00:00:00.000Z
authors:
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
- name: sofianguy
url: 'https://github.com/sofianguy'
image_url: 'https://github.com/sofianguy.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
- name: sofianguy
url: 'https://github.com/sofianguy'
image_url: 'https://github.com/sofianguy.png?size=96'
slug: electron-18-0
---
Electron 18.0.0 has been released! It includes upgrades to Chromium `100`, V8 `10.0`, and Node.js `16.13.2`. Read below for more details!
@ -28,20 +27,20 @@ Additionally, Electron has changed supported versions from latest three versions
### Stack Changes
* Chromium `100`
* [New in Chrome 100](https://developer.chrome.com/blog/new-in-chrome-100/)
* Node.js `16.13.2`
* [Node 16.13.2 blog post](https://nodejs.org/en/blog/release/v16.13.2/)
* V8 `10.0`
- Chromium `100`
- [New in Chrome 100](https://developer.chrome.com/blog/new-in-chrome-100/)
- Node.js `16.13.2`
- [Node 16.13.2 blog post](https://nodejs.org/en/blog/release/v16.13.2/)
- V8 `10.0`
### Highlighted Features
* Added `ses.setCodeCachePath()` API for setting code cache directory. [#33286](https://github.com/electron/electron/pull/33286)
* Removed the old `BrowserWindowProxy`-based implementation of `window.open`. This also removes the `nativeWindowOpen` option from `webPreferences`. [#29405](https://github.com/electron/electron/pull/29405)
* Added 'focus' and 'blur' events to `WebContents`. [#25873](https://github.com/electron/electron/pull/25873)
* Added Substitutions menu roles on macOS: `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`. [#32024](https://github.com/electron/electron/pull/32024)
* Added `first-instance-ack` event to the `app.requestSingleInstanceLock()` flow, so that users can pass some data back from the second instance to the first instance. [#31460](https://github.com/electron/electron/pull/31460)
* Added support for more color formats in `setBackgroundColor`. [#33364](https://github.com/electron/electron/pull/33364)
- Added `ses.setCodeCachePath()` API for setting code cache directory. [#33286](https://github.com/electron/electron/pull/33286)
- Removed the old `BrowserWindowProxy`-based implementation of `window.open`. This also removes the `nativeWindowOpen` option from `webPreferences`. [#29405](https://github.com/electron/electron/pull/29405)
- Added 'focus' and 'blur' events to `WebContents`. [#25873](https://github.com/electron/electron/pull/25873)
- Added Substitutions menu roles on macOS: `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`. [#32024](https://github.com/electron/electron/pull/32024)
- Added `first-instance-ack` event to the `app.requestSingleInstanceLock()` flow, so that users can pass some data back from the second instance to the first instance. [#31460](https://github.com/electron/electron/pull/31460)
- Added support for more color formats in `setBackgroundColor`. [#33364](https://github.com/electron/electron/pull/33364)
See the [18.0.0 release notes](https://github.com/electron/electron/releases/tag/v18.0.0) for a full list of new features and changes.
@ -53,7 +52,7 @@ Below are breaking changes introduced in Electron 18. More information about the
Prior to Electron 15, `window.open` was by default shimmed to use `BrowserWindowProxy`. This meant that `window.open('about:blank')` did not work to open synchronously scriptable child windows, among other incompatibilities. Since Electron 15, `nativeWindowOpen` has been enabled by default.
See the [documentation for window.open](https://www.electronjs.org/docs/latest/api/window-open#windowopenurl-framename-features) in Electron for more details. Removed in [#29405](https://github.com/electron/electron/pull/29405)
See the [documentation for window.open](https://www.electronjs.org/docs/latest/api/window-open#windowopenurl-framename-features) in Electron for more details. Removed in [#29405](https://github.com/electron/electron/pull/29405)
## End of Support for 14.x.y
@ -61,12 +60,12 @@ Electron 14.x.y has reached end-of-support as per the project's [support policy]
As of Electron 15, we have changed supported versions from latest three versions to latest four versions until May 2022 with Electron 19. After Electron 19, we will return to supporting the latest three versions. This version support change is part of our new cadence change. Please see [our blog post for full details here](https://www.electronjs.org/blog/8-week-cadence/#-will-electron-extend-the-number-of-supported-versions).
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ---- | ---- | ---- | ---- | ---- |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## What's Next

Просмотреть файл

@ -2,14 +2,13 @@
title: Electron 19.0.0
date: 2022-05-24T00:00:00.000Z
authors:
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/VerteDinde.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
slug: electron-19-0
---
Electron 19.0.0 has been released! It includes upgrades to Chromium `102`, V8 `10.2`, and Node.js `16.14.2`. Read below for more details!
@ -22,16 +21,16 @@ The Electron team is excited to announce the release of Electron 19.0.0! You can
### Electron Release Cadence Change
The project is returning to its earlier policy of supporting the latest three major versions. [See our versioning document](https://www.electronjs.org/docs/latest/tutorial/electron-versioning) for more detailed information about Electron versioning and support. This had temporarily been four major versions to help users adjust to the new release cadence that began in Electron 15. You can read the [full details here](https://www.electronjs.org/blog/8-week-cadence).
The project is returning to its earlier policy of supporting the latest three major versions. [See our versioning document](https://www.electronjs.org/docs/latest/tutorial/electron-versioning) for more detailed information about Electron versioning and support. This had temporarily been four major versions to help users adjust to the new release cadence that began in Electron 15. You can read the [full details here](https://www.electronjs.org/blog/8-week-cadence).
### Stack Changes
* Chromium `102`
* [New in Chrome 102](https://developer.chrome.com/blog/new-in-chrome-102/)
* [New in Chrome 101](https://developer.chrome.com/blog/new-in-chrome-101/)
* Node.js `16.14.2`
* [Node 16.14.2 blog post](https://nodejs.org/en/blog/release/v16.14.2/)
* V8 `10.2`
- Chromium `102`
- [New in Chrome 102](https://developer.chrome.com/blog/new-in-chrome-102/)
- [New in Chrome 101](https://developer.chrome.com/blog/new-in-chrome-101/)
- Node.js `16.14.2`
- [Node 16.14.2 blog post](https://nodejs.org/en/blog/release/v16.14.2/)
- V8 `10.2`
## Breaking & API Changes
@ -49,12 +48,13 @@ The semi-documented `preloadURL` property has been removed from WebPreferences.
Electron 14.x.y and 15.x.y have both reached end-of-support. This [returns](https://www.electronjs.org/blog/8-week-cadence/#-will-electron-extend-the-number-of-supported-versions) Electron to its [existing policy](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy) of supporting the latest three major versions. Developers and applications are encouraged to upgrade to a newer version of Electron.
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ---- | ---- | ---- | ---- | ---- |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
| E15 (Sep'21) | E16 (Nov'21) | E17 (Feb'22) | E18 (Mar'22) | E19 (May'22) |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| 15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
| 14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
| 13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
| 12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
## What's Next
In the short term, you can expect the team to continue to focus on keeping up with the development of the major components that make up Electron, including Chromium, Node, and V8. Although we are careful not to make promises about release dates, our plan is to release new major versions of Electron with new versions of those components approximately every 2 months.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/ckerr.png?size=96'
slug: electron-2-0
---
After more than four months of development, eight beta releases, and worldwide
testing from many apps' staged rollouts, the release of Electron 2.0.0 is now
available from [electronjs.org](https://electronjs.org/).
@ -21,100 +22,103 @@ Electron 2.0.0 also represents an improvement to how Electron is stabilized befo
## Changes / New Features
* Major bumps to several important parts of Electron's toolchain, including Chrome 61, Node 8.9.3, V8 6.1.534.41, GTK+ 3 on Linux, updated spellchecker, and Squirrel.
* [In-app purchases](https://electronjs.org/blog/in-app-purchases)
are now supported on MacOS. [#11292](https://github.com/electron/electron/pull/11292)
* New API for loading files. [#11565](https://github.com/electron/electron/pull/11565)
* New API to enable/disable a window. [#11832](https://github.com/electron/electron/pull/11832)
* New API app.setLocale(). [#11469](https://github.com/electron/electron/pull/11469)
* New support for logging IPC messages. [#11880](https://github.com/electron/electron/pull/11880)
* New menu events. [#11754](https://github.com/electron/electron/pull/11754)
* Add a `shutdown` event to powerMonitor. [#11417](https://github.com/electron/electron/pull/11417)
* Add `affinity` option for gathering several BrowserWindows into a single process. [#11501](https://github.com/electron/electron/pull/11501)
* Add the ability for saveDialog to list available extensions. [#11873](https://github.com/electron/electron/pull/11873)
* Support for additional notification actions [#11647](https://github.com/electron/electron/pull/11647)
* The ability to set macOS notification close button title. [#11654](https://github.com/electron/electron/pull/11654)
* Add conditional for menu.popup(window, callback)
* Memory improvements in touchbar items. [#12527](https://github.com/electron/electron/pull/12527)
* Improved security recommendation checklist.
* Add App-Scoped Security scoped bookmarks. [#11711](https://github.com/electron/electron/pull/11711)
* Add ability to set arbitrary arguments in a renderer process. [#11850](https://github.com/electron/electron/pull/11850)
* Add accessory view for format picker. [#11873](https://github.com/electron/electron/pull/11873)
* Fixed network delegate race condition. [#12053](https://github.com/electron/electron/pull/12053)
* Drop support for the `mips64el` arch on Linux. Electron requires the C++14 toolchain, which was
not available for that arch at the time of the release. We hope to re-add support in the future.
- Major bumps to several important parts of Electron's toolchain, including Chrome 61, Node 8.9.3, V8 6.1.534.41, GTK+ 3 on Linux, updated spellchecker, and Squirrel.
- [In-app purchases](https://electronjs.org/blog/in-app-purchases)
are now supported on MacOS. [#11292](https://github.com/electron/electron/pull/11292)
- New API for loading files. [#11565](https://github.com/electron/electron/pull/11565)
- New API to enable/disable a window. [#11832](https://github.com/electron/electron/pull/11832)
- New API app.setLocale(). [#11469](https://github.com/electron/electron/pull/11469)
- New support for logging IPC messages. [#11880](https://github.com/electron/electron/pull/11880)
- New menu events. [#11754](https://github.com/electron/electron/pull/11754)
- Add a `shutdown` event to powerMonitor. [#11417](https://github.com/electron/electron/pull/11417)
- Add `affinity` option for gathering several BrowserWindows into a single process. [#11501](https://github.com/electron/electron/pull/11501)
- Add the ability for saveDialog to list available extensions. [#11873](https://github.com/electron/electron/pull/11873)
- Support for additional notification actions [#11647](https://github.com/electron/electron/pull/11647)
- The ability to set macOS notification close button title. [#11654](https://github.com/electron/electron/pull/11654)
- Add conditional for menu.popup(window, callback)
- Memory improvements in touchbar items. [#12527](https://github.com/electron/electron/pull/12527)
- Improved security recommendation checklist.
- Add App-Scoped Security scoped bookmarks. [#11711](https://github.com/electron/electron/pull/11711)
- Add ability to set arbitrary arguments in a renderer process. [#11850](https://github.com/electron/electron/pull/11850)
- Add accessory view for format picker. [#11873](https://github.com/electron/electron/pull/11873)
- Fixed network delegate race condition. [#12053](https://github.com/electron/electron/pull/12053)
- Drop support for the `mips64el` arch on Linux. Electron requires the C++14 toolchain, which was
not available for that arch at the time of the release. We hope to re-add support in the future.
## Breaking API changes
* Removed [deprecated APIs](https://github.com/electron/electron/blob/v2.0.0-beta.8/docs/tutorial/planned-breaking-changes.md), including:
* Changed `menu.popup` signature. [#11968](https://github.com/electron/electron/pull/11968)
* Removed deprecated `crashReporter.setExtraParameter` [#11972](https://github.com/electron/electron/pull/11972)
* Removed deprecated `webContents.setZoomLevelLimits` and `webFrame.setZoomLevelLimits`. [#11974](https://github.com/electron/electron/pull/11974)
* Removed deprecated `clipboard` methods. [#11973](https://github.com/electron/electron/pull/11973)
* Removed support for boolean parameters for `tray.setHighlightMode`. [#11981](https://github.com/electron/electron/pull/11981)
- Removed [deprecated APIs](https://github.com/electron/electron/blob/v2.0.0-beta.8/docs/tutorial/planned-breaking-changes.md), including:
- Changed `menu.popup` signature. [#11968](https://github.com/electron/electron/pull/11968)
- Removed deprecated `crashReporter.setExtraParameter` [#11972](https://github.com/electron/electron/pull/11972)
- Removed deprecated `webContents.setZoomLevelLimits` and `webFrame.setZoomLevelLimits`. [#11974](https://github.com/electron/electron/pull/11974)
- Removed deprecated `clipboard` methods. [#11973](https://github.com/electron/electron/pull/11973)
- Removed support for boolean parameters for `tray.setHighlightMode`. [#11981](https://github.com/electron/electron/pull/11981)
## Bug Fixes
* Changed to make sure `webContents.isOffscreen()` is always available. [#12531](https://github.com/electron/electron/pull/12531)
* Fixed `BrowserWindow.getFocusedWindow()` when DevTools is undocked and focused. [#12554](https://github.com/electron/electron/pull/12554)
* Fixed preload not loading in sandboxed render if preload path contains special chars. [#12643](https://github.com/electron/electron/pull/12643)
* Correct the default of allowRunningInsecureContent as per docs. [#12629](https://github.com/electron/electron/pull/12629)
* Fixed transparency on nativeImage. [#12683](https://github.com/electron/electron/pull/12683)
* Fixed issue with `Menu.buildFromTemplate`. [#12703](https://github.com/electron/electron/pull/12703)
* Confirmed menu.popup options are objects. [#12330](https://github.com/electron/electron/pull/12330)
* Removed a race condition between new process creation and context release. [#12361](https://github.com/electron/electron/pull/12361)
* Update draggable regions when changing BrowserView. [#12370](https://github.com/electron/electron/pull/12370)
* Fixed menubar toggle alt key detection on focus. [#12235](https://github.com/electron/electron/pull/12235)
* Fixed incorrect warnings in webviews. [#12236](https://github.com/electron/electron/pull/12236)
* Fixed inheritance of 'show' option from parent windows. [#122444](https://github.com/electron/electron/pull/122444)
* Ensure that `getLastCrashReport()` is actually the last crash report. [#12255](https://github.com/electron/electron/pull/12255)
* Fixed require on network share path. [#12287](https://github.com/electron/electron/pull/12287)
* Fixed context menu click callback. [#12170](https://github.com/electron/electron/pull/12170)
* Fixed popup menu position. [#12181](https://github.com/electron/electron/pull/12181)
* Improved libuv loop cleanup. [#11465](https://github.com/electron/electron/pull/11465)
* Fixed `hexColorDWORDToRGBA` for transparent colors. [#11557](https://github.com/electron/electron/pull/11557)
* Fixed null pointer dereference with getWebPreferences api. [#12245](https://github.com/electron/electron/pull/12245)
* Fixed a cyclic reference in menu delegate. [#11967](https://github.com/electron/electron/pull/11967)
* Fixed protocol filtering of net.request. [#11657](https://github.com/electron/electron/pull/11657)
* WebFrame.setVisualZoomLevelLimits now sets user-agent scale constraints [#12510](https://github.com/electron/electron/pull/12510)
* Set appropriate defaults for webview options. [#12292](https://github.com/electron/electron/pull/12292)
* Improved vibrancy support. [#12157](https://github.com/electron/electron/pull/12157) [#12171](https://github.com/electron/electron/pull/12171) [#11886](https://github.com/electron/electron/pull/11886)
* Fixed timing issue in singleton fixture.
* Fixed broken production cache in NotifierSupportsActions()
* Made MenuItem roles camelCase-compatible. [#11532](https://github.com/electron/electron/pull/11532)
* Improved touch bar updates. [#11812](https://github.com/electron/electron/pull/11812), [#11761](https://github.com/electron/electron/pull/11761).
* Removed extra menu separators. [#11827](https://github.com/electron/electron/pull/11827)
* Fixed Bluetooth chooser bug. Closes [#11399](https://github.com/electron/electron/pull/11399).
* Fixed macos Full Screen Toggle menu item label. [#11633](https://github.com/electron/electron/pull/11633)
* Improved tooltip hiding when a window is deactivated. [#11644](https://github.com/electron/electron/pull/11644)
* Migrated deprecated web-view method. [#11798](https://github.com/electron/electron/pull/11798)
* Fixed closing a window opened from a browserview. [#11799](https://github.com/electron/electron/pull/11799)
* Fixed Bluetooth chooser bug. [#11492](https://github.com/electron/electron/pull/11492)
* Updated to use task scheduler for app.getFileIcon API. [#11595](https://github.com/electron/electron/pull/11595)
* Changed to fire `console-message` event even when rendering offscreen. [#11921](https://github.com/electron/electron/pull/11921)
* Fixed downloading from custom protocols using `WebContents.downloadURL`. [#11804](https://github.com/electron/electron/pull/11804)
* Fixed transparent windows losing transparency when devtools detaches. [#11956](https://github.com/electron/electron/pull/11956)
* Fixed Electron apps canceling restart or shutdown. [#11625](https://github.com/electron/electron/pull/11625)
- Changed to make sure `webContents.isOffscreen()` is always available. [#12531](https://github.com/electron/electron/pull/12531)
- Fixed `BrowserWindow.getFocusedWindow()` when DevTools is undocked and focused. [#12554](https://github.com/electron/electron/pull/12554)
- Fixed preload not loading in sandboxed render if preload path contains special chars. [#12643](https://github.com/electron/electron/pull/12643)
- Correct the default of allowRunningInsecureContent as per docs. [#12629](https://github.com/electron/electron/pull/12629)
- Fixed transparency on nativeImage. [#12683](https://github.com/electron/electron/pull/12683)
- Fixed issue with `Menu.buildFromTemplate`. [#12703](https://github.com/electron/electron/pull/12703)
- Confirmed menu.popup options are objects. [#12330](https://github.com/electron/electron/pull/12330)
- Removed a race condition between new process creation and context release. [#12361](https://github.com/electron/electron/pull/12361)
- Update draggable regions when changing BrowserView. [#12370](https://github.com/electron/electron/pull/12370)
- Fixed menubar toggle alt key detection on focus. [#12235](https://github.com/electron/electron/pull/12235)
- Fixed incorrect warnings in webviews. [#12236](https://github.com/electron/electron/pull/12236)
- Fixed inheritance of 'show' option from parent windows. [#122444](https://github.com/electron/electron/pull/122444)
- Ensure that `getLastCrashReport()` is actually the last crash report. [#12255](https://github.com/electron/electron/pull/12255)
- Fixed require on network share path. [#12287](https://github.com/electron/electron/pull/12287)
- Fixed context menu click callback. [#12170](https://github.com/electron/electron/pull/12170)
- Fixed popup menu position. [#12181](https://github.com/electron/electron/pull/12181)
- Improved libuv loop cleanup. [#11465](https://github.com/electron/electron/pull/11465)
- Fixed `hexColorDWORDToRGBA` for transparent colors. [#11557](https://github.com/electron/electron/pull/11557)
- Fixed null pointer dereference with getWebPreferences api. [#12245](https://github.com/electron/electron/pull/12245)
- Fixed a cyclic reference in menu delegate. [#11967](https://github.com/electron/electron/pull/11967)
- Fixed protocol filtering of net.request. [#11657](https://github.com/electron/electron/pull/11657)
- WebFrame.setVisualZoomLevelLimits now sets user-agent scale constraints [#12510](https://github.com/electron/electron/pull/12510)
- Set appropriate defaults for webview options. [#12292](https://github.com/electron/electron/pull/12292)
- Improved vibrancy support. [#12157](https://github.com/electron/electron/pull/12157) [#12171](https://github.com/electron/electron/pull/12171) [#11886](https://github.com/electron/electron/pull/11886)
- Fixed timing issue in singleton fixture.
- Fixed broken production cache in NotifierSupportsActions()
- Made MenuItem roles camelCase-compatible. [#11532](https://github.com/electron/electron/pull/11532)
- Improved touch bar updates. [#11812](https://github.com/electron/electron/pull/11812), [#11761](https://github.com/electron/electron/pull/11761).
- Removed extra menu separators. [#11827](https://github.com/electron/electron/pull/11827)
- Fixed Bluetooth chooser bug. Closes [#11399](https://github.com/electron/electron/pull/11399).
- Fixed macos Full Screen Toggle menu item label. [#11633](https://github.com/electron/electron/pull/11633)
- Improved tooltip hiding when a window is deactivated. [#11644](https://github.com/electron/electron/pull/11644)
- Migrated deprecated web-view method. [#11798](https://github.com/electron/electron/pull/11798)
- Fixed closing a window opened from a browserview. [#11799](https://github.com/electron/electron/pull/11799)
- Fixed Bluetooth chooser bug. [#11492](https://github.com/electron/electron/pull/11492)
- Updated to use task scheduler for app.getFileIcon API. [#11595](https://github.com/electron/electron/pull/11595)
- Changed to fire `console-message` event even when rendering offscreen. [#11921](https://github.com/electron/electron/pull/11921)
- Fixed downloading from custom protocols using `WebContents.downloadURL`. [#11804](https://github.com/electron/electron/pull/11804)
- Fixed transparent windows losing transparency when devtools detaches. [#11956](https://github.com/electron/electron/pull/11956)
- Fixed Electron apps canceling restart or shutdown. [#11625](https://github.com/electron/electron/pull/11625)
### macOS
* Fixed event leak on reuse of touchbar item. [#12624](https://github.com/electron/electron/pull/12624)
* Fixed tray highlight in darkmode. [#12398](https://github.com/electron/electron/pull/12398)
* Fixed blocking main process for async dialog. [#12407](https://github.com/electron/electron/pull/12407)
* Fixed `setTitle` tray crash. [#12356](https://github.com/electron/electron/pull/12356)
* Fixed crash when setting dock menu. [#12087](https://github.com/electron/electron/pull/12087)
- Fixed event leak on reuse of touchbar item. [#12624](https://github.com/electron/electron/pull/12624)
- Fixed tray highlight in darkmode. [#12398](https://github.com/electron/electron/pull/12398)
- Fixed blocking main process for async dialog. [#12407](https://github.com/electron/electron/pull/12407)
- Fixed `setTitle` tray crash. [#12356](https://github.com/electron/electron/pull/12356)
- Fixed crash when setting dock menu. [#12087](https://github.com/electron/electron/pull/12087)
### Linux
* Better Linux desktop notifications. [#12229](https://github.com/electron/electron/pull/12229) [#12216](https://github.com/electron/electron/pull/12216) [#11965](https://github.com/electron/electron/pull/11965) [#11980](https://github.com/electron/electron/pull/11980)
* Better GTK+ theme support for menus. [#12331](https://github.com/electron/electron/pull/12331)
* Exit gracefully on linux. [#12139](https://github.com/electron/electron/pull/12139)
* Use the apps name as the tray icon's default tooltip. [#12393](https://github.com/electron/electron/pull/12393)
- Better Linux desktop notifications. [#12229](https://github.com/electron/electron/pull/12229) [#12216](https://github.com/electron/electron/pull/12216) [#11965](https://github.com/electron/electron/pull/11965) [#11980](https://github.com/electron/electron/pull/11980)
- Better GTK+ theme support for menus. [#12331](https://github.com/electron/electron/pull/12331)
- Exit gracefully on linux. [#12139](https://github.com/electron/electron/pull/12139)
- Use the apps name as the tray icon's default tooltip. [#12393](https://github.com/electron/electron/pull/12393)
### Windows
* Added Visual Studio 2017 support. [#11656](https://github.com/electron/electron/pull/11656)
* Fixed passing of exception to the system crash handler. [#12259](https://github.com/electron/electron/pull/12259)
* Fixed hiding tooltip from minimized window. [#11644](https://github.com/electron/electron/pull/11644)
* Fixed `desktopCapturer` to capture the correct screen. [#11664](https://github.com/electron/electron/pull/11664)
* Fixed `disableHardwareAcceleration` with transparency. [#11704](https://github.com/electron/electron/pull/11704)
- Added Visual Studio 2017 support. [#11656](https://github.com/electron/electron/pull/11656)
- Fixed passing of exception to the system crash handler. [#12259](https://github.com/electron/electron/pull/12259)
- Fixed hiding tooltip from minimized window. [#11644](https://github.com/electron/electron/pull/11644)
- Fixed `desktopCapturer` to capture the correct screen. [#11664](https://github.com/electron/electron/pull/11664)
- Fixed `disableHardwareAcceleration` with transparency. [#11704](https://github.com/electron/electron/pull/11704)
# What's Next

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/groundwater.png?size=96'
slug: electron-2-semantic-boogaloo
---
A new major version of Electron is in the works, and with it some changes to our versioning strategy. As of version 2.0.0, Electron will strictly adhere to Semantic Versioning.
---
@ -15,24 +16,24 @@ This change means you'll see the major version bump more often, and it will usua
**Major Version Increments**
* Chromium version updates
* Node.js major version updates
* Electron breaking API changes
- Chromium version updates
- Node.js major version updates
- Electron breaking API changes
**Minor Version Increments**
* Node.js minor version updates
* Electron non-breaking API changes
- Node.js minor version updates
- Electron non-breaking API changes
**Patch Version Increments**
* Node.js patch version updates
* fix-related chromium patches
* Electron bug fixes
- Node.js patch version updates
- fix-related chromium patches
- Electron bug fixes
Because Electron's semver ranges will now be more meaningful, we recommend
installing Electron using npm's default `--save-dev` flag, which will prefix
your version with `^`, keeping you safely up to date with minor and patch
your version with `^`, keeping you safely up to date with minor and patch
updates:
```sh

Просмотреть файл

@ -2,11 +2,10 @@
title: Electron 20.0.0
date: 2022-08-02T00:00:00.000Z
authors:
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
slug: electron-20-0
---
Electron 20.0.0 has been released! It includes upgrades to Chromium `104`, V8 `10.4`, and Node.js `16.15.0`. Read below for more details!
@ -19,21 +18,21 @@ The Electron team is excited to announce the release of Electron 20.0.0! You can
### New Features
* Added immersive dark mode on Windows. [#34549](https://github.com/electron/electron/pull/34549)
* Added support for panel-like behavior. Window can float over full-screened apps. [#34665](https://github.com/electron/electron/pull/34665)
* Updated Windows Control Overlay buttons to look and feel more native on Windows 11. [#34888](https://github.com/electron/electron/pull/34888)
* Renderers are now sandboxed by default unless `nodeIntegration: true` or `sandbox: false` is specified. [#35125](https://github.com/electron/electron/pull/35125)
* Added safeguards when building native modules with nan. [#35160](https://github.com/electron/electron/pull/35160)
- Added immersive dark mode on Windows. [#34549](https://github.com/electron/electron/pull/34549)
- Added support for panel-like behavior. Window can float over full-screened apps. [#34665](https://github.com/electron/electron/pull/34665)
- Updated Windows Control Overlay buttons to look and feel more native on Windows 11. [#34888](https://github.com/electron/electron/pull/34888)
- Renderers are now sandboxed by default unless `nodeIntegration: true` or `sandbox: false` is specified. [#35125](https://github.com/electron/electron/pull/35125)
- Added safeguards when building native modules with nan. [#35160](https://github.com/electron/electron/pull/35160)
### Stack Changes
* Chromium `104`
* [New in Chrome 104](https://developer.chrome.com/blog/new-in-chrome-104/)
* [New in Chrome 103](https://developer.chrome.com/blog/new-in-chrome-103/)
* [New in DevTools](https://developer.chrome.com/blog/new-in-devtools-104/)
* Node.js `16.15.0`
* [Node 16.15.0 blog post](https://nodejs.org/en/blog/release/v16.15.0/)
* V8 `10.4`
- Chromium `104`
- [New in Chrome 104](https://developer.chrome.com/blog/new-in-chrome-104/)
- [New in Chrome 103](https://developer.chrome.com/blog/new-in-chrome-103/)
- [New in DevTools](https://developer.chrome.com/blog/new-in-devtools-104/)
- Node.js `16.15.0`
- [Node 16.15.0 blog post](https://nodejs.org/en/blog/release/v16.15.0/)
- V8 `10.4`
## Breaking & API Changes
@ -48,6 +47,7 @@ If your preload scripts do not depend on Node, no action is needed. If your prel
### Fixed: spontaneous crashing in nan native modules
In Electron 20, we changed two items related to native modules:
1. V8 headers now use `c++17` by default. This flag was added to electron-rebuild.
1. We fixed an issue where a missing include would cause spontaneous crashing in native modules that depended on nan.

Просмотреть файл

@ -2,17 +2,16 @@
title: Electron 21.0.0
date: 2022-09-27T00:00:00.000Z
authors:
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
- name: vertedinde
url: 'https://github.com/vertedinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
- name: ckerr
url: 'https://github.com/ckerr'
image_url: 'https://github.com/ckerr.png?size=96'
- name: vertedinde
url: 'https://github.com/vertedinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
slug: electron-21-0
---
Electron 21.0.0 has been released! It includes upgrades to Chromium `106`, V8 `10.6`, and Node.js `16.16.0`. Read below for more details!
@ -27,31 +26,32 @@ If you have any feedback, please share it with us on Twitter, or join our commun
### Stack Changes
* Chromium `106`
* [New in Chrome 106](https://developer.chrome.com/blog/new-in-chrome-106/)
* [New in Chrome 105](https://developer.chrome.com/blog/new-in-chrome-105/)
* [New in DevTools 106](https://developer.chrome.com/blog/new-in-devtools-106/)
* [New in DevTools 105](https://developer.chrome.com/blog/new-in-devtools-105/)
* Node.js `16.16.0`
* [Node 16.16.0 blog post](https://nodejs.org/en/blog/release/v16.16.0/)
* V8 `10.6`
- Chromium `106`
- [New in Chrome 106](https://developer.chrome.com/blog/new-in-chrome-106/)
- [New in Chrome 105](https://developer.chrome.com/blog/new-in-chrome-105/)
- [New in DevTools 106](https://developer.chrome.com/blog/new-in-devtools-106/)
- [New in DevTools 105](https://developer.chrome.com/blog/new-in-devtools-105/)
- Node.js `16.16.0`
- [Node 16.16.0 blog post](https://nodejs.org/en/blog/release/v16.16.0/)
- V8 `10.6`
### New Features
* Added `webFrameMain.origin`. [#35534](https://github.com/electron/electron/pull/35534)
* Added new `WebContents.ipc` and `WebFrameMain.ipc` APIs. [#35231](https://github.com/electron/electron/pull/35231)
* Added support for panel-like behavior. Window can float over full-screened apps. [#34388](https://github.com/electron/electron/pull/34388)
* Added support for push notifications from APNs for macOS apps. [#33574](https://github.com/electron/electron/pull/33574)
- Added `webFrameMain.origin`. [#35534](https://github.com/electron/electron/pull/35534)
- Added new `WebContents.ipc` and `WebFrameMain.ipc` APIs. [#35231](https://github.com/electron/electron/pull/35231)
- Added support for panel-like behavior. Window can float over full-screened apps. [#34388](https://github.com/electron/electron/pull/34388)
- Added support for push notifications from APNs for macOS apps. [#33574](https://github.com/electron/electron/pull/33574)
## Breaking & API Changes
Below are breaking changes introduced in Electron 21.
Below are breaking changes introduced in Electron 21.
### V8 Memory Cage Enabled
Electron 21 enables [V8 sandboxed pointers](https://docs.google.com/document/d/1HSap8-J3HcrZvT7-5NsbYWcjfc0BVoops5TDHZNsnko/edit), following Chrome's [decision to do the same in Chrome 103](https://chromiumdash.appspot.com/commit/9a6a76bf13d3ca1c6788de193afc5513919dd0ed). This has some implications for native modules. This feature has performance and security benefits, but also places some new restrictions on native modules, e.g. use of ArrayBuffers that point to external ("off-heap") memory. Please see [this blog post](https://electronjs.org/blog/v8-memory-cage) for more information. [#34724](https://github.com/electron/electron/pull/34724)
Electron 21 enables [V8 sandboxed pointers](https://docs.google.com/document/d/1HSap8-J3HcrZvT7-5NsbYWcjfc0BVoops5TDHZNsnko/edit), following Chrome's [decision to do the same in Chrome 103](https://chromiumdash.appspot.com/commit/9a6a76bf13d3ca1c6788de193afc5513919dd0ed). This has some implications for native modules. This feature has performance and security benefits, but also places some new restrictions on native modules, e.g. use of ArrayBuffers that point to external ("off-heap") memory. Please see [this blog post](https://electronjs.org/blog/v8-memory-cage) for more information. [#34724](https://github.com/electron/electron/pull/34724)
### Refactored webContents.printToPDF
Refactored `webContents.printToPDF` to align with Chromium's headless implementation. See [#33654](https://github.com/electron/electron/pull/33654) for more information.
More information about these and future changes can be found on the [Planned Breaking Changes](https://www.electronjs.org/docs/latest/breaking-changes) page.

Просмотреть файл

@ -2,14 +2,13 @@
title: Electron 22.0.0
date: 2022-11-29T00:00:00.000Z
authors:
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
slug: electron-22-0
---
Electron 22.0.0 has been released! It includes a new utility process API, updates for Windows 7/8/8.1 support, and upgrades to Chromium `108`, V8 `10.8`, and Node.js `16.17.1`. Read below for more details!
@ -24,14 +23,14 @@ If you have any feedback, please share it with us on Twitter, or join our commun
### Stack Changes
* Chromium `108`
* [New in Chrome 108](https://developer.chrome.com/blog/new-in-chrome-108/)
* [New in Chrome 107](https://developer.chrome.com/blog/new-in-chrome-107/)
* [New in DevTools 108](https://developer.chrome.com/blog/new-in-devtools-108/)
* [New in DevTools 107](https://developer.chrome.com/blog/new-in-devtools-107/)
* Node.js `16.17.1`
* [Node 16.17.1 blog post](https://nodejs.org/en/blog/release/v16.17.1/)
* V8 `10.8`
- Chromium `108`
- [New in Chrome 108](https://developer.chrome.com/blog/new-in-chrome-108/)
- [New in Chrome 107](https://developer.chrome.com/blog/new-in-chrome-107/)
- [New in DevTools 108](https://developer.chrome.com/blog/new-in-devtools-108/)
- [New in DevTools 107](https://developer.chrome.com/blog/new-in-devtools-107/)
- Node.js `16.17.1`
- [Node 16.17.1 blog post](https://nodejs.org/en/blog/release/v16.17.1/)
- V8 `10.8`
### Highlighted Features
@ -49,7 +48,7 @@ You can read more about the [new UtilityProcess API in our docs here](https://ww
Last month, Google announced that [Chrome 109 would continue to receive critical
security fixes](https://support.google.com/chrome/a/thread/185534987) for
Windows Server 2012 and Windows Server 2012 R2 until October 10, 2023.
Windows Server 2012 and Windows Server 2012 R2 until October 10, 2023.
In accordance, Electron 22's (Chromium 108) planned end of life date will be extended from May 30, 2023 to October 10, 2023. The Electron team will continue to backport any security fixes that are part of this program to Electron 22 until October 10, 2023.
Note that we will not make additional security fixes for Windows 7/8/8.1.
@ -62,12 +61,12 @@ Electron 22 will be the last Electron major version to support Windows 7/8/8.1.
Windows 7/8/8.1 will not be supported in Electron 23 and later major releases.
#### Additional Highlighted Changes
#### Additional Highlighted Changes
* Added support for Web Bluetooth pin pairing on Linux and Windows. [#35416](https://github.com/electron/electron/pull/35416)
* Added `LoadBrowserProcessSpecificV8Snapshot` as a new fuse that will let the main/browser process load its v8 snapshot from a file at `browser_v8_context_snapshot.bin`. Any other process will use the same path as is used today. [#35266](https://github.com/electron/electron/pull/35266)
* Added `WebContents.opener` to access window opener and `webContents.fromFrame(frame)` to get the WebContents corresponding to a WebFrameMain instance. [#35140](https://github.com/electron/electron/pull/35140)
* Added support for `navigator.mediaDevices.getDisplayMedia` via a new session handler, `ses.setDisplayMediaRequestHandler`. [#30702](https://github.com/electron/electron/pull/30702)
- Added support for Web Bluetooth pin pairing on Linux and Windows. [#35416](https://github.com/electron/electron/pull/35416)
- Added `LoadBrowserProcessSpecificV8Snapshot` as a new fuse that will let the main/browser process load its v8 snapshot from a file at `browser_v8_context_snapshot.bin`. Any other process will use the same path as is used today. [#35266](https://github.com/electron/electron/pull/35266)
- Added `WebContents.opener` to access window opener and `webContents.fromFrame(frame)` to get the WebContents corresponding to a WebFrameMain instance. [#35140](https://github.com/electron/electron/pull/35140)
- Added support for `navigator.mediaDevices.getDisplayMedia` via a new session handler, `ses.setDisplayMediaRequestHandler`. [#30702](https://github.com/electron/electron/pull/30702)
## Breaking API Changes

Просмотреть файл

@ -2,20 +2,19 @@
title: Electron 23.0.0
date: 2023-2-07T00:00:00.000Z
authors:
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
- name: erickzhao
url: 'https://github.com/erickzhao'
image_url: 'https://github.com/erickzhao.png?size=96'
- name: VerteDinde
url: 'https://github.com/VerteDinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: georgexu99
url: 'https://github.com/georgexu99'
image_url: 'https://github.com/georgexu99.png?size=96'
- name: erickzhao
url: 'https://github.com/erickzhao'
image_url: 'https://github.com/erickzhao.png?size=96'
slug: electron-23-0
---
Electron 23.0.0 has been released! It includes upgrades to Chromium `110`, V8 `11.0`, and Node.js `18.12.1`. Additionally, support for Windows 7/8/8.1 has been dropped. Read below for more details!
Electron 23.0.0 has been released! It includes upgrades to Chromium `110`, V8 `11.0`, and Node.js `18.12.1`. Additionally, support for Windows 7/8/8.1 has been dropped. Read below for more details!
---
@ -27,22 +26,22 @@ If you have any feedback, please share it with us on Twitter, or join our commun
### Stack Changes
* Chromium `110`
* [New in Chrome 110](https://developer.chrome.com/blog/new-in-chrome-110/)
* [New in Chrome 109](https://developer.chrome.com/blog/new-in-chrome-109/)
* [New in DevTools 110](https://developer.chrome.com/blog/new-in-devtools-110/)
* [New in DevTools 109](https://developer.chrome.com/blog/new-in-devtools-109/)
* Node.js `18.12.1`
* [Node 18.12.1 blog post](https://nodejs.org/en/blog/release/v18.12.1/)
* V8 `11.0`
- Chromium `110`
- [New in Chrome 110](https://developer.chrome.com/blog/new-in-chrome-110/)
- [New in Chrome 109](https://developer.chrome.com/blog/new-in-chrome-109/)
- [New in DevTools 110](https://developer.chrome.com/blog/new-in-devtools-110/)
- [New in DevTools 109](https://developer.chrome.com/blog/new-in-devtools-109/)
- Node.js `18.12.1`
- [Node 18.12.1 blog post](https://nodejs.org/en/blog/release/v18.12.1/)
- V8 `11.0`
### New Features
* Added `label` property to [`Display`](https://www.electronjs.org/docs/latest/api/structures/display) objects. [#36933](https://github.com/electron/electron/pull/36933)
* Added an `app.getPreferredSystemLanguages()` API to return the user's system languages. [#36035](https://github.com/electron/electron/pull/36035)
* Added support for the [WebUSB](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API) API. [#36289](https://github.com/electron/electron/pull/36289)
* Added support for [`SerialPort.forget()`](https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/forget) as well as a new event `serial-port-revoked` emitted on [Session](https://www.electronjs.org/docs/latest/api/session) objects when a given origin is revoked. [#35310](https://github.com/electron/electron/pull/35310)
* Added new `win.setHiddenInMissionControl` API to allow developers to opt out of Mission Control on macOS. [#36092](https://github.com/electron/electron/pull/36092)
- Added `label` property to [`Display`](https://www.electronjs.org/docs/latest/api/structures/display) objects. [#36933](https://github.com/electron/electron/pull/36933)
- Added an `app.getPreferredSystemLanguages()` API to return the user's system languages. [#36035](https://github.com/electron/electron/pull/36035)
- Added support for the [WebUSB](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API) API. [#36289](https://github.com/electron/electron/pull/36289)
- Added support for [`SerialPort.forget()`](https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/forget) as well as a new event `serial-port-revoked` emitted on [Session](https://www.electronjs.org/docs/latest/api/session) objects when a given origin is revoked. [#35310](https://github.com/electron/electron/pull/35310)
- Added new `win.setHiddenInMissionControl` API to allow developers to opt out of Mission Control on macOS. [#36092](https://github.com/electron/electron/pull/36092)
## Dropping Windows 7/8/8.1 Support

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/codebytere.png?size=96'
slug: electron-3-0
---
The Electron team is excited to announce that the first stable release of Electron 3 is now
available from [electronjs.org](https://electronjs.org/) and via `npm install electron@latest`! It's jam-packed with upgrades, fixes, and new features, and we can't wait to see what you build with them. Below are details about this release, and we welcome your feedback as you explore.
@ -20,79 +21,79 @@ As we undertook development of `v3.0.0`, we sought to more empirically define cr
Major bumps to several important parts of Electron's toolchain, including Chrome `v66.0.3359.181`, Node `v10.2.0`, and V8 `v6.6.346.23.`
* [[#12656](https://github.com/electron/electron/pull/12656)] feat: `app.isPackaged`
* [[#12652](https://github.com/electron/electron/pull/12652)] feat: `app.whenReady()`
* [[#13183](https://github.com/electron/electron/pull/13183)] feat: `process.getHeapStatistics()`
* [[#12485](https://github.com/electron/electron/pull/12485)] feat: `win.moveTop()` to move window z-order to top
* [[#13110](https://github.com/electron/electron/pull/13110)] feat: TextField and Button APIs
* [[#13068](https://github.com/electron/electron/pull/13068)] feat: netLog API for dynamic logging control
* [[#13539](https://github.com/electron/electron/pull/13539)] feat: enable `webview` in sandbox renderer
* [[#14118](https://github.com/electron/electron/pull/14118)] feat: `fs.readSync` now works with massive files
* [[#14031](https://github.com/electron/electron/pull/14031)] feat: node `fs` wrappers to make `fs.realpathSync.native` and `fs.realpath.native` available
- [[#12656](https://github.com/electron/electron/pull/12656)] feat: `app.isPackaged`
- [[#12652](https://github.com/electron/electron/pull/12652)] feat: `app.whenReady()`
- [[#13183](https://github.com/electron/electron/pull/13183)] feat: `process.getHeapStatistics()`
- [[#12485](https://github.com/electron/electron/pull/12485)] feat: `win.moveTop()` to move window z-order to top
- [[#13110](https://github.com/electron/electron/pull/13110)] feat: TextField and Button APIs
- [[#13068](https://github.com/electron/electron/pull/13068)] feat: netLog API for dynamic logging control
- [[#13539](https://github.com/electron/electron/pull/13539)] feat: enable `webview` in sandbox renderer
- [[#14118](https://github.com/electron/electron/pull/14118)] feat: `fs.readSync` now works with massive files
- [[#14031](https://github.com/electron/electron/pull/14031)] feat: node `fs` wrappers to make `fs.realpathSync.native` and `fs.realpath.native` available
## Breaking API changes
* [[#12362](https://github.com/electron/electron/pull/12362)] feat: updates to menu item order control
* [[#13050](https://github.com/electron/electron/pull/13050)] refactor: removed documented deprecated APIs
* See [docs](https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md#breaking-api-changes-30) for more details
* [[#12477](https://github.com/electron/electron/pull/12477)] refactor: removed `did-get-response-details` and `did-get-redirect-request` events
* [[#12655](https://github.com/electron/electron/pull/12655)] feat: default to disabling navigating on drag/drop
* [[#12993](https://github.com/electron/electron/pull/12993)] feat: Node `v4.x` or greater is required use the `electron` npm module
* [[#12008](https://github.com/electron/electron/pull/12008) [#12140](https://github.com/electron/electron/pull/12140) [#12503](https://github.com/electron/electron/pull/12503) [#12514](https://github.com/electron/electron/pull/12514) [#12584](https://github.com/electron/electron/pull/12584) [#12596](https://github.com/electron/electron/pull/12596) [#12637](https://github.com/electron/electron/pull/12637) [#12660](https://github.com/electron/electron/pull/12660) [#12696](https://github.com/electron/electron/pull/12696) [#12716](https://github.com/electron/electron/pull/12716) [#12750](https://github.com/electron/electron/pull/12750) [#12787](https://github.com/electron/electron/pull/12787) [#12858](https://github.com/electron/electron/pull/12858)] refactor: `NativeWindow`
* [[#11968](https://github.com/electron/electron/pull/11968)] refactor: `menu.popup()`
* [[#8953](https://github.com/electron/electron/pull/8953)] feat: no longer use JSON to send the result of `ipcRenderer.sendSync`
* [[#13039](https://github.com/electron/electron/pull/13039)] feat: default to ignore command line arguments following a URL
* [[#12004](https://github.com/electron/electron/pull/12004)] refactor: rename `api::Window` to `api::BrowserWindow`
* [[#12679](https://github.com/electron/electron/pull/12679)] feat: visual zoom now turned off by default
* [[#12408](https://github.com/electron/electron/pull/12408)] refactor: rename app-command `media-play_pause` to `media-play-pause`
- [[#12362](https://github.com/electron/electron/pull/12362)] feat: updates to menu item order control
- [[#13050](https://github.com/electron/electron/pull/13050)] refactor: removed documented deprecated APIs
- See [docs](https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md#breaking-api-changes-30) for more details
- [[#12477](https://github.com/electron/electron/pull/12477)] refactor: removed `did-get-response-details` and `did-get-redirect-request` events
- [[#12655](https://github.com/electron/electron/pull/12655)] feat: default to disabling navigating on drag/drop
- [[#12993](https://github.com/electron/electron/pull/12993)] feat: Node `v4.x` or greater is required use the `electron` npm module
- [[#12008](https://github.com/electron/electron/pull/12008) [#12140](https://github.com/electron/electron/pull/12140) [#12503](https://github.com/electron/electron/pull/12503) [#12514](https://github.com/electron/electron/pull/12514) [#12584](https://github.com/electron/electron/pull/12584) [#12596](https://github.com/electron/electron/pull/12596) [#12637](https://github.com/electron/electron/pull/12637) [#12660](https://github.com/electron/electron/pull/12660) [#12696](https://github.com/electron/electron/pull/12696) [#12716](https://github.com/electron/electron/pull/12716) [#12750](https://github.com/electron/electron/pull/12750) [#12787](https://github.com/electron/electron/pull/12787) [#12858](https://github.com/electron/electron/pull/12858)] refactor: `NativeWindow`
- [[#11968](https://github.com/electron/electron/pull/11968)] refactor: `menu.popup()`
- [[#8953](https://github.com/electron/electron/pull/8953)] feat: no longer use JSON to send the result of `ipcRenderer.sendSync`
- [[#13039](https://github.com/electron/electron/pull/13039)] feat: default to ignore command line arguments following a URL
- [[#12004](https://github.com/electron/electron/pull/12004)] refactor: rename `api::Window` to `api::BrowserWindow`
- [[#12679](https://github.com/electron/electron/pull/12679)] feat: visual zoom now turned off by default
- [[#12408](https://github.com/electron/electron/pull/12408)] refactor: rename app-command `media-play_pause` to `media-play-pause`
### macOS
* [[#12093](https://github.com/electron/electron/pull/12093)] feat: workspace notifications support
* [[#12496](https://github.com/electron/electron/pull/12496)] feat: `tray.setIgnoreDoubleClickEvents(ignore)` to ignore tray double click events.
* [[#12281](https://github.com/electron/electron/pull/12281)] feat: mouse forward functionality on macOS
* [[#12714](https://github.com/electron/electron/pull/12714)] feat: screen lock / unlock events
- [[#12093](https://github.com/electron/electron/pull/12093)] feat: workspace notifications support
- [[#12496](https://github.com/electron/electron/pull/12496)] feat: `tray.setIgnoreDoubleClickEvents(ignore)` to ignore tray double click events.
- [[#12281](https://github.com/electron/electron/pull/12281)] feat: mouse forward functionality on macOS
- [[#12714](https://github.com/electron/electron/pull/12714)] feat: screen lock / unlock events
### Windows
* [[#12879](https://github.com/electron/electron/pull/12879)] feat: added DIP to/from screen coordinate conversions
- [[#12879](https://github.com/electron/electron/pull/12879)] feat: added DIP to/from screen coordinate conversions
**Nota Bene:** Switching to an older version of Electron after running this version will require you to clear out your user data directory to avoid older versions crashing. You can get the user data directory by running `console.log(app.getPath("userData"))` or see [docs](https://electronjs.org/docs/latest/api/app#appgetpathname) for more details.
## Bug Fixes
* [[#13397](https://github.com/electron/electron/pull/13397)] fix: issue with `fs.statSyncNoException` throwing exceptions
* [[#13476](https://github.com/electron/electron/pull/13476), [#13452](https://github.com/electron/electron/pull/13452)] fix: crash when loading site with jquery
* [[#14092](https://github.com/electron/electron/pull/14092)] fix: crash in `net::ClientSocketHandle` destructor
* [[#14453](https://github.com/electron/electron/pull/14453)] fix: notify focus change right away rather not on next tick
- [[#13397](https://github.com/electron/electron/pull/13397)] fix: issue with `fs.statSyncNoException` throwing exceptions
- [[#13476](https://github.com/electron/electron/pull/13476), [#13452](https://github.com/electron/electron/pull/13452)] fix: crash when loading site with jquery
- [[#14092](https://github.com/electron/electron/pull/14092)] fix: crash in `net::ClientSocketHandle` destructor
- [[#14453](https://github.com/electron/electron/pull/14453)] fix: notify focus change right away rather not on next tick
### MacOS
* [[#13220](https://github.com/electron/electron/pull/13220)] fix: issue allowing bundles to be selected in `<input file="type">` open file dialog
* [[#12404](https://github.com/electron/electron/pull/12404)] fix: issue blocking main process when using async dialog
* [[#12043](https://github.com/electron/electron/pull/12043)] fix: context menu click callback
* [[#12527](https://github.com/electron/electron/pull/12527)] fix: event leak on reuse of touchbar item
* [[#12352](https://github.com/electron/electron/pull/12352)] fix: tray title crash
* [[#12327](https://github.com/electron/electron/pull/12327)] fix: non-draggable regions
* [[#12809](https://github.com/electron/electron/pull/12809)] fix: to prevent menu update while it's open
* [[#13162](https://github.com/electron/electron/pull/13162)] fix: tray icon bounds not allowing negative values
* [[#13085](https://github.com/electron/electron/pull/13085)] fix: tray title not inverting when highlighted
* [[#12196](https://github.com/electron/electron/pull/12196)] fix: Mac build when `enable_run_as_node==false`
* [[#12157](https://github.com/electron/electron/pull/12157)] fix: additional issues on frameless windows with vibrancy
* [[#13326](https://github.com/electron/electron/pull/13326)] fix: to set mac protocol to none after calling `app.removeAsDefaultProtocolClient`
* [[#13530](https://github.com/electron/electron/pull/13530)] fix: incorrect usage of private APIs in MAS build
* [[#13517](https://github.com/electron/electron/pull/13517)] fix: `tray.setContextMenu` crash
* [[#14205](https://github.com/electron/electron/pull/14205)] fix: pressing escape on a dialog now closes it even if `defaultId` is set
- [[#13220](https://github.com/electron/electron/pull/13220)] fix: issue allowing bundles to be selected in `<input file="type">` open file dialog
- [[#12404](https://github.com/electron/electron/pull/12404)] fix: issue blocking main process when using async dialog
- [[#12043](https://github.com/electron/electron/pull/12043)] fix: context menu click callback
- [[#12527](https://github.com/electron/electron/pull/12527)] fix: event leak on reuse of touchbar item
- [[#12352](https://github.com/electron/electron/pull/12352)] fix: tray title crash
- [[#12327](https://github.com/electron/electron/pull/12327)] fix: non-draggable regions
- [[#12809](https://github.com/electron/electron/pull/12809)] fix: to prevent menu update while it's open
- [[#13162](https://github.com/electron/electron/pull/13162)] fix: tray icon bounds not allowing negative values
- [[#13085](https://github.com/electron/electron/pull/13085)] fix: tray title not inverting when highlighted
- [[#12196](https://github.com/electron/electron/pull/12196)] fix: Mac build when `enable_run_as_node==false`
- [[#12157](https://github.com/electron/electron/pull/12157)] fix: additional issues on frameless windows with vibrancy
- [[#13326](https://github.com/electron/electron/pull/13326)] fix: to set mac protocol to none after calling `app.removeAsDefaultProtocolClient`
- [[#13530](https://github.com/electron/electron/pull/13530)] fix: incorrect usage of private APIs in MAS build
- [[#13517](https://github.com/electron/electron/pull/13517)] fix: `tray.setContextMenu` crash
- [[#14205](https://github.com/electron/electron/pull/14205)] fix: pressing escape on a dialog now closes it even if `defaultId` is set
### Linux
* [[#12507](https://github.com/electron/electron/pull/12507)] fix: `BrowserWindow.focus()` for offscreen windows
- [[#12507](https://github.com/electron/electron/pull/12507)] fix: `BrowserWindow.focus()` for offscreen windows
## Other Notes
* PDF Viewer is currently not working but is being worked on and will be functional once again soon
* `TextField` and `Button` APIs are experimental and are therefore off by default
* They can be enabled with the `enable_view_api` build flag
- PDF Viewer is currently not working but is being worked on and will be functional once again soon
- `TextField` and `Button` APIs are experimental and are therefore off by default
- They can be enabled with the `enable_view_api` build flag
# What's Next

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: electron-37
---
Electron `0.37` was recently [released](https://github.com/electron/electron/releases) and included a major upgrade from Chrome 47 to Chrome 49 and also several new core APIs. This latest release brings in all the new features shipped in [Chrome 48](http://blog.chromium.org/2015/12/chrome-48-beta-present-to-cast-devices_91.html) and [Chrome 49](http://blog.chromium.org/2016/02/chrome-49-beta-css-custom-properties.html). This includes CSS custom properties, increased [ES6](http://www.ecma-international.org/ecma-262/6.0/) support, `KeyboardEvent` improvements, `Promise` improvements, and many other new features now available in your Electron app.
---
@ -15,12 +16,12 @@ Electron `0.37` was recently [released](https://github.com/electron/electron/rel
### CSS Custom Properties
If you've used preprocessed languages like Sass and Less, you're probably familiar with *variables*, which allow you to define reusable values for things like color schemes and layouts. Variables help keep your stylesheets DRY and more maintainable.
If you've used preprocessed languages like Sass and Less, you're probably familiar with _variables_, which allow you to define reusable values for things like color schemes and layouts. Variables help keep your stylesheets DRY and more maintainable.
CSS custom properties are similar to preprocessed variables in that they are reusable, but they also have a unique quality that makes them even more powerful and flexible: **they can be manipulated with JavaScript**. This subtle but powerful feature allows for dynamic changes to visual interfaces while still benefitting from [CSS's hardware acceleration](https://developer.mozilla.org/en-US/Apps/Fundamentals/Performance/Performance_fundamentals#Use_CSS_animations_and_transitions), and reduced code duplication between your frontend code and stylesheets.
For more info on CSS custom properties, see the [MDN article](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) and the
[Google Chrome demo](https://googlechrome.github.io/samples/css-custom-properties/).
[Google Chrome demo](https://googlechrome.github.io/samples/css-custom-properties/).
#### CSS Variables In Action
@ -28,7 +29,7 @@ Let's walk through a simple variable example that can be tweaked live in your ap
```css
:root {
--awesome-color: #A5ECFA;
--awesome-color: #a5ecfa;
}
body {
@ -40,10 +41,12 @@ The variable value can be retrieved and changed directly in JavaScript:
```js
// Get the variable value ' #A5ECFA'
let color = window.getComputedStyle(document.body).getPropertyValue('--awesome-color')
let color = window
.getComputedStyle(document.body)
.getPropertyValue('--awesome-color');
// Set the variable value to 'orange'
document.body.style.setProperty('--awesome-color', 'orange')
document.body.style.setProperty('--awesome-color', 'orange');
```
The variable values can be also edited from the **Styles** section of the development tools for quick feedback and tweaks:
@ -57,9 +60,9 @@ Chrome 48 added the new `code` property available on `KeyboardEvent` events that
This should make implementing custom keyboard shortcuts in your Electron app more accurate and consistent across machines and configurations.
```js
window.addEventListener('keydown', function(event) {
console.log(`${event.code} was pressed.`)
})
window.addEventListener('keydown', function (event) {
console.log(`${event.code} was pressed.`);
});
```
Check out [this example](https://googlechrome.github.io/samples/keyboardevent-code-attribute/) to see it in action.
@ -70,12 +73,12 @@ Chrome 49 added two new `window` events that allow you to be notified when an re
```js
window.addEventListener('unhandledrejection', function (event) {
console.log('A rejected promise was unhandled', event.promise, event.reason)
})
console.log('A rejected promise was unhandled', event.promise, event.reason);
});
window.addEventListener('rejectionhandled', function (event) {
console.log('A rejected promise was handled', event.promise, event.reason)
})
console.log('A rejected promise was handled', event.promise, event.reason);
});
```
Check out [this example](https://googlechrome.github.io/samples/promise-rejection-events/index.html) to see it in action.
@ -88,10 +91,10 @@ The version of V8 now in Electron incorporates [91% of ES2015](https://kangax.gi
```js
function multiply(x, y = 1) {
return x * y
return x * y;
}
multiply(5) // 5
multiply(5); // 5
```
#### Destructuring assignment
@ -103,37 +106,37 @@ This makes Electron requires cleaner and more compact to assign now:
##### Browser Process Requires
```js
const {app, BrowserWindow, Menu} = require('electron')
const { app, BrowserWindow, Menu } = require('electron');
```
##### Renderer Process Requires
```js
const {dialog, Tray} = require('electron').remote
const { dialog, Tray } = require('electron').remote;
```
##### Other Examples
```js
// Destructuring an array and skipping the second element
const [first, , last] = findAll()
const [first, , last] = findAll();
// Destructuring function parameters
function whois({displayName: displayName, fullName: {firstName: name}}){
console.log(`${displayName} is ${name}`)
function whois({ displayName: displayName, fullName: { firstName: name } }) {
console.log(`${displayName} is ${name}`);
}
let user = {
displayName: "jdoe",
displayName: 'jdoe',
fullName: {
firstName: "John",
lastName: "Doe"
}
}
whois(user) // "jdoe is John"
firstName: 'John',
lastName: 'Doe',
},
};
whois(user); // "jdoe is John"
// Destructuring an object
let {name, avatar} = getUser()
let { name, avatar } = getUser();
```
## New Electron APIs
@ -145,11 +148,15 @@ A few of the new Electron APIs are below, you can see each new API in the releas
These events are emitted when the window is either shown or hidden.
```js
const {BrowserWindow} = require('electron')
const { BrowserWindow } = require('electron');
let window = new BrowserWindow({width: 500, height: 500})
window.on('show', function () { console.log('Window was shown') })
window.on('hide', function () { console.log('Window was hidden') })
let window = new BrowserWindow({ width: 500, height: 500 });
window.on('show', function () {
console.log('Window was shown');
});
window.on('hide', function () {
console.log('Window was hidden');
});
```
#### `platform-theme-changed` on `app` for `OS X`
@ -157,11 +164,11 @@ window.on('hide', function () { console.log('Window was hidden') })
This event is emitted when the systems [Dark Mode](https://discussions.apple.com/thread/6661740) theme is toggled.
```js
const {app} = require('electron')
const { app } = require('electron');
app.on('platform-theme-changed', function () {
console.log(`Platform theme changed. In dark mode? ${app.isDarkMode()}`)
})
console.log(`Platform theme changed. In dark mode? ${app.isDarkMode()}`);
});
```
#### `app.isDarkMode()` for `OS X`
@ -173,9 +180,13 @@ This method returns `true` if the system is in Dark Mode, and `false` otherwise.
These events are emitted when the scroll wheel event phase has begun or has ended.
```js
const {BrowserWindow} = require('electron')
const { BrowserWindow } = require('electron');
let window = new BrowserWindow({width: 500, height: 500})
window.on('scroll-touch-begin', function () { console.log('Scroll touch started') })
window.on('scroll-touch-end', function () { console.log('Scroll touch ended') })
let window = new BrowserWindow({ width: 500, height: 500 });
window.on('scroll-touch-begin', function () {
console.log('Scroll touch started');
});
window.on('scroll-touch-end', function () {
console.log('Scroll touch ended');
});
```

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/BinaryMuse.png?size=96'
slug: electron-4-0
---
The Electron team is excited to announce that the stable release of Electron 4 is now available! You can install it from [electronjs.org](https://electronjs.org/) or from npm via `npm install electron@latest`. The release is packed with upgrades, fixes, and new features, and we can't wait to see what you build with them. Read more for details about this release, and please share any feedback you have as you explore!
---
@ -45,34 +46,43 @@ When a module is required via `remote.require` in a renderer process, a `remote-
// Control `remote.require` from all WebContents:
app.on('remote-require', function (event, webContents, requestedModuleName) {
// ...
})
});
// Control `remote.require` from a specific WebContents instance:
browserWin.webContents.on('remote-require', function (event, requestedModuleName) {
// ...
})
browserWin.webContents.on(
'remote-require',
function (event, requestedModuleName) {
// ...
}
);
```
In a similar fashion, when `remote.getGlobal(name)` is called, a `remote-get-global` event is raised. This works the same way as the `remote-require` event: call `preventDefault()` to prevent the global from being returned, and set `event.returnValue` to return a custom value.
```javascript
// Control `remote.getGlobal` from all WebContents:
app.on('remote-get-global', function (event, webContents, requrestedGlobalName) {
// ...
})
app.on(
'remote-get-global',
function (event, webContents, requrestedGlobalName) {
// ...
}
);
// Control `remote.getGlobal` from a specific WebContents instance:
browserWin.webContents.on('remote-get-global', function (event, requestedGlobalName) {
// ...
})
browserWin.webContents.on(
'remote-get-global',
function (event, requestedGlobalName) {
// ...
}
);
```
For more information, see the following documentation:
* [`remote.require`](https://electronjs.org/docs/api/remote#remoterequiremodule)
* [`remote.getGlobal`](https://electronjs.org/docs/api/remote#remotegetglobalname)
* [`app`](https://electronjs.org/docs/api/app)
* [`WebContents`](https://electronjs.org/docs/api/web-contents)
- [`remote.require`](https://electronjs.org/docs/api/remote#remoterequiremodule)
- [`remote.getGlobal`](https://electronjs.org/docs/api/remote#remotegetglobalname)
- [`app`](https://electronjs.org/docs/api/app)
- [`WebContents`](https://electronjs.org/docs/api/web-contents)
### JavaScript Access to the About Panel
@ -119,11 +129,11 @@ When creating a new `BrowserWindow` with the `webPreferences` option set, the fo
<div className="table table-ruled table-full-width">
| Property | Deprecated Default | New Default |
|----------|--------------------|-------------|
| `contextIsolation` | `false` | `true` |
| `nodeIntegration` | `true` | `false` |
| `webviewTag` | value of `nodeIntegration` if set, otherwise `true` | `false` |
| Property | Deprecated Default | New Default |
| ------------------ | --------------------------------------------------- | ----------- |
| `contextIsolation` | `false` | `true` |
| `nodeIntegration` | `true` | `false` |
| `webviewTag` | value of `nodeIntegration` if set, otherwise `true` | `false` |
</div>

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: electron-5-0-timeline
---
For the first time ever, Electron is excited to publicize our release schedule starting with v5.0.0. This is our first step in having a public, long-term timeline.
---

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/jkleinsc.png?size=96'
slug: electron-5-0
---
The Electron team is excited to announce the release of Electron 5.0.0! You can install it with npm via `npm install electron@latest` or download the tarballs from [our releases page](https://github.com/electron/electron/releases/tag/v5.0.0). The release is packed with upgrades, fixes, and new features. We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!
---
@ -36,25 +37,27 @@ Electron 5 also includes improvements to Electron-specific APIs. A summary of th
### Promisification
Electron 5 continues [Promisification initiative](https://github.com/electron/electron/blob/5-0-x/docs/api/promisification.md) initiative to convert Electron's callback-based API to use Promises. These APIs were converted for Electron 5:
* `app.getFileIcon`
* `contentTracing.getCategories`
* `contentTracing.startRecording`
* `contentTracing.stopRecording`
* `debugger.sendCommand`
* Cookies API
* `shell.openExternal`
* `webContents.loadFile`
* `webContents.loadURL`
* `webContents.zoomLevel`
* `webContents.zoomFactor`
* `win.capturePage`
- `app.getFileIcon`
- `contentTracing.getCategories`
- `contentTracing.startRecording`
- `contentTracing.stopRecording`
- `debugger.sendCommand`
- Cookies API
- `shell.openExternal`
- `webContents.loadFile`
- `webContents.loadURL`
- `webContents.zoomLevel`
- `webContents.zoomFactor`
- `win.capturePage`
### System colors access for macOS
These functions were changed or added to `systemPreferences` to access macOS systems' colors:
* `systemPreferences.getAccentColor`
* `systemPreferences.getColor`
* `systemPreferences.getSystemColor`
- `systemPreferences.getAccentColor`
- `systemPreferences.getColor`
- `systemPreferences.getSystemColor`
### Process memory information
@ -79,6 +82,7 @@ Packaged apps will now behave the same as the default app: a default application
Mixed sandbox mode is now enabled by default. Renderers launched with `sandbox: true` will now be actually sandboxed, where previously they would only be sandboxed if mixed-sandbox mode was also enabled.
### Security improvements
The default values of `nodeIntegration` and `webviewTag` are now `false` to improve security.
### Spellchecker now asynchronous
@ -90,25 +94,32 @@ The SpellCheck API has been changed to provide [asynchronous results](https://gi
The following APIs are newly deprecated in Electron 5.0.0 and planned for removal in 6.0.0:
### Mksnapshot binaries for arm and arm64
Native binaries of mksnapshot for arm and arm64 are deprecated and will be removed in 6.0.0. Snapshots can be created for arm and arm64 using the x64 binaries.
### ServiceWorker APIs on WebContents
Deprecated ServiceWorker APIs on WebContents in preparation for their removal.
* `webContents.hasServiceWorker`
* `webContents.unregisterServiceWorker`
- `webContents.hasServiceWorker`
- `webContents.unregisterServiceWorker`
### Automatic modules with sandboxed webContents
In order to improve security, the following modules are being deprecated for use directly via `require` and will instead need to be included via `remote.require` in a sandboxed webcontents:
* `electron.screen`
* `child_process`
* `fs`
* `os`
* `path`
- `electron.screen`
- `child_process`
- `fs`
- `os`
- `path`
## webFrame Isolated World APIs
`webFrame.setIsolatedWorldContentSecurityPolicy`,`webFrame.setIsolatedWorldHumanReadableName`, `webFrame.setIsolatedWorldSecurityOrigin` have been deprecated in favor of `webFrame.setIsolatedWorldInfo`.
### Mixed sandbox
`enableMixedSandbox` and the `--enable-mixed-sandbox` command-line switch still exist for compatibility, but are deprecated and have no effect.
## End of support for 2.0.x

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/codebytere.png?size=96'
slug: electron-6-0
---
The Electron team is excited to announce the release of Electron 6.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new features. We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!
---
@ -30,7 +31,7 @@ Much of Electron's functionality is provided by the core components of Chromium,
- Node.js `12.4.0`
- [Node 12.4.0 blog post](https://nodejs.org/en/blog/release/v12.4.0/)
- V8 `7.6.303.22`
- [V8 7.6 blog post](https://v8.dev/blog/v8-release-76)
- [V8 7.6 blog post](https://v8.dev/blog/v8-release-76)
This release also includes improvements to Electron's APIs. [The release notes](https://github.com/electron/electron/releases/tag/v6.0.0) have a more complete list, but here are the highlights:
@ -39,40 +40,43 @@ This release also includes improvements to Electron's APIs. [The release notes](
Electron 6.0 continues the modernization [initiative](https://github.com/electron/electron/blob/master/docs/api/modernization/promisification.md) started in 5.0 to improve [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) support.
These functions now return Promises and still support older callback-based invocation:
* `contentTracing.getCategories()` [#16583](https://github.com/electron/electron/pull/16583)
* `contentTracing.getCategories()` [#16583](https://github.com/electron/electron/pull/16583)
* `contentTracing.getTraceBufferUsage()` [#16600](https://github.com/electron/electron/pull/16600)
* `contents.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
* `cookies.flushStore()` [#16464](https://github.com/electron/electron/pull/16464)
* `cookies.get()` [#16464](https://github.com/electron/electron/pull/16464)
* `cookies.remove()` [#16464](https://github.com/electron/electron/pull/16464)
* `cookies.set()` [#16464](https://github.com/electron/electron/pull/16464)
* `dialog.showCertificateTrustDialog()` [#17181](https://github.com/electron/electron/pull/17181)
* `inAppPurchase.getProducts()` [#17355](https://github.com/electron/electron/pull/17355)
* `inAppPurchase.purchaseProduct()`[#17355](https://github.com/electron/electron/pull/17355)
* `netLog.stopLogging()` [#16862](https://github.com/electron/electron/pull/16862)
* `session.clearAuthCache()` [#17259](https://github.com/electron/electron/pull/17259)
* `session.clearCache()` [#17185](https://github.com/electron/electron/pull/17185)
* `session.clearHostResolverCache()` [#17229](https://github.com/electron/electron/pull/17229)
* `session.clearStorageData()` [#17249](https://github.com/electron/electron/pull/17249)
* `session.getBlobData()` [#17303](https://github.com/electron/electron/pull/17303)
* `session.getCacheSize()` [#17185](https://github.com/electron/electron/pull/17185)
* `session.resolveProxy()` [#17222](https://github.com/electron/electron/pull/17222)
* `session.setProxy()` [#17222](https://github.com/electron/electron/pull/17222)
* `webContents.hasServiceWorker()` [#16535](https://github.com/electron/electron/pull/16535)
* `webContents.printToPDF()` [#16795](https://github.com/electron/electron/pull/16795)
* `webContents.savePage()` [#16742](https://github.com/electron/electron/pull/16742)
* `webFrame.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
* `webFrame.executeJavaScriptInIsolatedWorld()` [#17312](https://github.com/electron/electron/pull/17312)
* `webviewTag.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
- `contentTracing.getCategories()` [#16583](https://github.com/electron/electron/pull/16583)
- `contentTracing.getCategories()` [#16583](https://github.com/electron/electron/pull/16583)
- `contentTracing.getTraceBufferUsage()` [#16600](https://github.com/electron/electron/pull/16600)
- `contents.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
- `cookies.flushStore()` [#16464](https://github.com/electron/electron/pull/16464)
- `cookies.get()` [#16464](https://github.com/electron/electron/pull/16464)
- `cookies.remove()` [#16464](https://github.com/electron/electron/pull/16464)
- `cookies.set()` [#16464](https://github.com/electron/electron/pull/16464)
- `dialog.showCertificateTrustDialog()` [#17181](https://github.com/electron/electron/pull/17181)
- `inAppPurchase.getProducts()` [#17355](https://github.com/electron/electron/pull/17355)
- `inAppPurchase.purchaseProduct()`[#17355](https://github.com/electron/electron/pull/17355)
- `netLog.stopLogging()` [#16862](https://github.com/electron/electron/pull/16862)
- `session.clearAuthCache()` [#17259](https://github.com/electron/electron/pull/17259)
- `session.clearCache()` [#17185](https://github.com/electron/electron/pull/17185)
- `session.clearHostResolverCache()` [#17229](https://github.com/electron/electron/pull/17229)
- `session.clearStorageData()` [#17249](https://github.com/electron/electron/pull/17249)
- `session.getBlobData()` [#17303](https://github.com/electron/electron/pull/17303)
- `session.getCacheSize()` [#17185](https://github.com/electron/electron/pull/17185)
- `session.resolveProxy()` [#17222](https://github.com/electron/electron/pull/17222)
- `session.setProxy()` [#17222](https://github.com/electron/electron/pull/17222)
- `webContents.hasServiceWorker()` [#16535](https://github.com/electron/electron/pull/16535)
- `webContents.printToPDF()` [#16795](https://github.com/electron/electron/pull/16795)
- `webContents.savePage()` [#16742](https://github.com/electron/electron/pull/16742)
- `webFrame.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
- `webFrame.executeJavaScriptInIsolatedWorld()` [#17312](https://github.com/electron/electron/pull/17312)
- `webviewTag.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
These functions now have two forms, synchronous and Promise-based asynchronous:
* `dialog.showMessageBox()`/`dialog.showMessageBoxSync()` [#17298](https://github.com/electron/electron/pull/17298)
* `dialog.showOpenDialog()`/`dialog.showOpenDialogSync()` [#16973](https://github.com/electron/electron/pull/16973)
* `dialog.showSaveDialog()`/`dialog.showSaveDialogSync()` [#17054](https://github.com/electron/electron/pull/17054)
- `dialog.showMessageBox()`/`dialog.showMessageBoxSync()` [#17298](https://github.com/electron/electron/pull/17298)
- `dialog.showOpenDialog()`/`dialog.showOpenDialogSync()` [#16973](https://github.com/electron/electron/pull/16973)
- `dialog.showSaveDialog()`/`dialog.showSaveDialogSync()` [#17054](https://github.com/electron/electron/pull/17054)
These functions now return Promises:
* `app.dock.show()` [#16904](https://github.com/electron/electron/pull/16904)
- `app.dock.show()` [#16904](https://github.com/electron/electron/pull/16904)
### `Electron Helper (Renderer).app`, `Electron Helper (GPU).app` and `Electron Helper (Plugin).app`
@ -87,17 +91,17 @@ Folks using `electron-osx-sign` to codesign their Electron app shouldn't have to
If you're codesigning your app with custom scripts, you should ensure
that the three new Helper applications are correctly codesigned.
In order to package your application correctly with these new helpers you need to be using `electron-packager@14.0.4` or higher. If you are using `electron-builder` you should follow [this issue](https://github.com/electron-userland/electron-builder/issues/4104) to track support for these new helpers.
In order to package your application correctly with these new helpers you need to be using `electron-packager@14.0.4` or higher. If you are using `electron-builder` you should follow [this issue](https://github.com/electron-userland/electron-builder/issues/4104) to track support for these new helpers.
## Breaking Changes
* This release begins laying the groundwork for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). The reasons for this change are faster performance, stronger security, and reduced maintenance workload. Read the full details including the proposed timeline in [this issue](https://github.com/electron/electron/issues/18397). This change is expected to be completed in Electron v11.
- This release begins laying the groundwork for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). The reasons for this change are faster performance, stronger security, and reduced maintenance workload. Read the full details including the proposed timeline in [this issue](https://github.com/electron/electron/issues/18397). This change is expected to be completed in Electron v11.
* `net.IncomingMessage` headers have [changed slightly](https://github.com/electron/electron/pull/17517#issue-263752903) to more closely match [Node.js behavior](https://nodejs.org/api/http.html#http_message_headers), particularly with the value of `set-cookie` and how duplicate headers are handled. [#17517](https://github.com/electron/electron/pull/17517).
- `net.IncomingMessage` headers have [changed slightly](https://github.com/electron/electron/pull/17517#issue-263752903) to more closely match [Node.js behavior](https://nodejs.org/api/http.html#http_message_headers), particularly with the value of `set-cookie` and how duplicate headers are handled. [#17517](https://github.com/electron/electron/pull/17517).
* `shell.showItemInFolder()` now returns void and is an asynchronous call. [#17121](https://github.com/electron/electron/pull/17121)
- `shell.showItemInFolder()` now returns void and is an asynchronous call. [#17121](https://github.com/electron/electron/pull/17121)
* Apps must now explicitly set a log path by calling the new function `app.setAppLogPath()` before using `app.getPath('log')`. [#17841](https://github.com/electron/electron/pull/17841)
- Apps must now explicitly set a log path by calling the new function `app.setAppLogPath()` before using `app.getPath('log')`. [#17841](https://github.com/electron/electron/pull/17841)
## End of Support for 3.x.y

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/ckerr.png?size=96'
slug: electron-7-0
---
Electron 7.0.0 has been released! It includes upgrades to Chromium 78, V8 7.8, and Node.js 12.8.1. We've added a Window on Arm 64 release, faster IPC methods, a new `nativeTheme` API, and much more!
---
@ -17,17 +18,19 @@ Electron 7.0.0 has been released! It includes upgrades to Chromium 78, V8 7.8, a
The Electron team is excited to announce the release of Electron 7.0.0! You can install it with npm via `npm install electron@latest` or download it from our [releases website](https://electronjs.org/releases/stable). The release is packed with upgrades, fixes, and new features. We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!
## Notable Changes
* Stack Upgrades:
| Stack | Version in Electron 6 | Version in Electron 7 | What's New |
|:---------|:----------------------|:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Chromium | 76.0.3809.146 | **78.0.3905.1** | [77](https://developers.google.com/web/updates/2019/09/nic77), [78](https://developers.google.com/web/updates/2019/10/nic78)
| V8 | 7.6 | **7.8** | [7.7](https://v8.dev/blog/v8-release-77), [7.8](https://v8.dev/blog/v8-release-78)
| Node.js | 12.4.0 | **12.8.1** | [12.5](https://nodejs.org/en/blog/release/v12.5.0/), [12.6](https://nodejs.org/en/blog/release/v12.6.0/), [12.7](https://nodejs.org/en/blog/release/v12.7.0/), [12.8](https://nodejs.org/en/blog/release/v12.8.0/), [12.8.1](https://nodejs.org/en/blog/release/v12.8.1/)
* Added Windows on Arm (64 bit) release. [#18591](https://github.com/electron/electron/pull/18591), [#20112](https://github.com/electron/electron/pull/20112)
* Added `ipcRenderer.invoke()` and `ipcMain.handle()` for asynchronous request/response-style IPC. These are strongly recommended over the `remote` module. See this "[Electrons remote module considered harmful](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31)" blog post for more information. [#18449](https://github.com/electron/electron/pull/18449)
* Added `nativeTheme` API to read and respond to changes in the OS's theme and color scheme. [#19758](https://github.com/electron/electron/pull/19758), [#20486](https://github.com/electron/electron/pull/20486)
* Switched to a new TypeScript Definitions [generator](https://github.com/electron/docs-parser). The resulting definitions are more precise; so if your TypeScript build fails, this is the likely cause. [#18103](https://github.com/electron/electron/pull/18103)
- Stack Upgrades:
| Stack | Version in Electron 6 | Version in Electron 7 | What's New |
| :------- | :-------------------- | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Chromium | 76.0.3809.146 | **78.0.3905.1** | [77](https://developers.google.com/web/updates/2019/09/nic77), [78](https://developers.google.com/web/updates/2019/10/nic78) |
| V8 | 7.6 | **7.8** | [7.7](https://v8.dev/blog/v8-release-77), [7.8](https://v8.dev/blog/v8-release-78) |
| Node.js | 12.4.0 | **12.8.1** | [12.5](https://nodejs.org/en/blog/release/v12.5.0/), [12.6](https://nodejs.org/en/blog/release/v12.6.0/), [12.7](https://nodejs.org/en/blog/release/v12.7.0/), [12.8](https://nodejs.org/en/blog/release/v12.8.0/), [12.8.1](https://nodejs.org/en/blog/release/v12.8.1/) |
- Added Windows on Arm (64 bit) release. [#18591](https://github.com/electron/electron/pull/18591), [#20112](https://github.com/electron/electron/pull/20112)
- Added `ipcRenderer.invoke()` and `ipcMain.handle()` for asynchronous request/response-style IPC. These are strongly recommended over the `remote` module. See this "[Electrons remote module considered harmful](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31)" blog post for more information. [#18449](https://github.com/electron/electron/pull/18449)
- Added `nativeTheme` API to read and respond to changes in the OS's theme and color scheme. [#19758](https://github.com/electron/electron/pull/19758), [#20486](https://github.com/electron/electron/pull/20486)
- Switched to a new TypeScript Definitions [generator](https://github.com/electron/docs-parser). The resulting definitions are more precise; so if your TypeScript build fails, this is the likely cause. [#18103](https://github.com/electron/electron/pull/18103)
See the [7.0.0 release notes](https://github.com/electron/electron/releases/tag/v7.0.0) for a longer list of changes.
@ -35,21 +38,21 @@ See the [7.0.0 release notes](https://github.com/electron/electron/releases/tag/
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md) page.
* Removed deprecated APIs:
* Callback-based versions of functions that now use Promises. [#17907](https://github.com/electron/electron/pull/17907)
* `Tray.setHighlightMode()` (macOS). [#18981](https://github.com/electron/electron/pull/18981)
* `app.enableMixedSandbox()` [#17894](https://github.com/electron/electron/pull/17894)
* `app.getApplicationMenu()`,
* `app.setApplicationMenu()`,
* `powerMonitor.querySystemIdleState()`,
* `powerMonitor.querySystemIdleTime()`,
* `webFrame.setIsolatedWorldContentSecurityPolicy()`,
* `webFrame.setIsolatedWorldHumanReadableName()`,
* `webFrame.setIsolatedWorldSecurityOrigin()` [#18159](https://github.com/electron/electron/pull/18159)
* `Session.clearAuthCache()` no longer allows filtering the cleared cache entries. [#17970](https://github.com/electron/electron/pull/17970)
* Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. [#19226](https://github.com/electron/electron/pull/19226)
* Updated the `electron` module to use `@electron/get`. The minimum supported node version is now Node 8. [#18413](https://github.com/electron/electron/pull/18413)
* The file `electron.asar` no longer exists. Any packaging scripts that depend on its existence should be updated. [#18577](https://github.com/electron/electron/pull/18577)
- Removed deprecated APIs:
- Callback-based versions of functions that now use Promises. [#17907](https://github.com/electron/electron/pull/17907)
- `Tray.setHighlightMode()` (macOS). [#18981](https://github.com/electron/electron/pull/18981)
- `app.enableMixedSandbox()` [#17894](https://github.com/electron/electron/pull/17894)
- `app.getApplicationMenu()`,
- `app.setApplicationMenu()`,
- `powerMonitor.querySystemIdleState()`,
- `powerMonitor.querySystemIdleTime()`,
- `webFrame.setIsolatedWorldContentSecurityPolicy()`,
- `webFrame.setIsolatedWorldHumanReadableName()`,
- `webFrame.setIsolatedWorldSecurityOrigin()` [#18159](https://github.com/electron/electron/pull/18159)
- `Session.clearAuthCache()` no longer allows filtering the cleared cache entries. [#17970](https://github.com/electron/electron/pull/17970)
- Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. [#19226](https://github.com/electron/electron/pull/19226)
- Updated the `electron` module to use `@electron/get`. The minimum supported node version is now Node 8. [#18413](https://github.com/electron/electron/pull/18413)
- The file `electron.asar` no longer exists. Any packaging scripts that depend on its existence should be updated. [#18577](https://github.com/electron/electron/pull/18577)
## End of Support for 4.x.y

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: electron-8-0
---
Electron 8.0.0 has been released! It includes upgrades to Chromium `80`, V8 `8.0`, and Node.js `12.13.0`. We've added Chrome's built-in spellchecker, and much more!
---
@ -19,80 +20,85 @@ The Electron team is excited to announce the release of Electron 8.0.0! You can
## Notable Changes
### Stack Changes
* Chromium `80.0.3987.86`
* [New in Chrome 79](https://developers.google.com/web/updates/2019/12/nic79)
* [New in Chrome 80](https://chromereleases.googleblog.com/2020/02/stable-channel-update-for-desktop.html)
* Node.js `12.13.0`
* [Node 12.13.0 blog post](https://nodejs.org/en/blog/release/v12.13.0/)
* V8 `8.0`
* [V8 7.9 blog post](https://v8.dev/blog/v8-release-79)
* [V8 8.0 blog post](https://v8.dev/blog/v8-release-80)
- Chromium `80.0.3987.86`
- [New in Chrome 79](https://developers.google.com/web/updates/2019/12/nic79)
- [New in Chrome 80](https://chromereleases.googleblog.com/2020/02/stable-channel-update-for-desktop.html)
- Node.js `12.13.0`
- [Node 12.13.0 blog post](https://nodejs.org/en/blog/release/v12.13.0/)
- V8 `8.0`
- [V8 7.9 blog post](https://v8.dev/blog/v8-release-79)
- [V8 8.0 blog post](https://v8.dev/blog/v8-release-80)
### Highlight Features
* Implemented usage of Chrome's built-in spellchecker feature. See more details in [#20692](https://github.com/electron/electron/pull/20692) and [#21266](https://github.com/electron/electron/pull/21266).
* IPC communication now uses v8's Structured Clone Algorithm. This is faster, more featureful, and less surprising than the existing logic, and brings about a 2x performance boost for large buffers and complex objects. Latency for small messages is not significantly affected. See more details in [#20214](https://github.com/electron/electron/pull/20214).
- Implemented usage of Chrome's built-in spellchecker feature. See more details in [#20692](https://github.com/electron/electron/pull/20692) and [#21266](https://github.com/electron/electron/pull/21266).
- IPC communication now uses v8's Structured Clone Algorithm. This is faster, more featureful, and less surprising than the existing logic, and brings about a 2x performance boost for large buffers and complex objects. Latency for small messages is not significantly affected. See more details in [#20214](https://github.com/electron/electron/pull/20214).
See the [8.0.0 release notes](https://github.com/electron/electron/releases/tag/v8.0.0) for a full list of new features and changes.
## Breaking Changes
* Show module name in deprecation warning for context-aware modules. [#21952](https://github.com/electron/electron/pull/21952)
* This is continued work for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Full info and proposed timeline is detailed in [this issue](https://github.com/electron/electron/issues/18397).
* Values sent over IPC are now serialized with Structured Clone Algorithm. [#20214](https://github.com/electron/electron/pull/20214)
* Offscreen Rendering is currently disabled due to lack of a maintainer to work on this feature. It broke during the Chromium upgrade and was subsequently disabled. [#20772](https://github.com/electron/electron/issues/20772)
- Show module name in deprecation warning for context-aware modules. [#21952](https://github.com/electron/electron/pull/21952)
- This is continued work for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Full info and proposed timeline is detailed in [this issue](https://github.com/electron/electron/issues/18397).
- Values sent over IPC are now serialized with Structured Clone Algorithm. [#20214](https://github.com/electron/electron/pull/20214)
- Offscreen Rendering is currently disabled due to lack of a maintainer to work on this feature. It broke during the Chromium upgrade and was subsequently disabled. [#20772](https://github.com/electron/electron/issues/20772)
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* `app` API changes:
* Added `app.getApplicationNameForProtocol(url)`. [#20399](https://github.com/electron/electron/pull/20399)
* Added `app.showAboutPanel()` and `app.setAboutPanelOptions(options)` support on Windows. [#19420](https://github.com/electron/electron/pull/19420)
* `BrowserWindow` API changes:
* Updated docs to note that BrowserWindow options `hasShadow` is available on all platforms [#20038](https://github.com/electron/electron/pull/20038)
* Added `trafficLightPosition` option to BrowserWindow options to allow custom positioning for traffic light buttons. [#21781](https://github.com/electron/electron/pull/21781)
* Added `accessibleTitle` option to BrowserWindow for setting the accessible window title [#19698](https://github.com/electron/electron/pull/19698)
* `BrowserWindow.fromWebContents()` can now return null [#19983](https://github.com/electron/electron/pull/19983)
* Added `BrowserWindow.getMediaSourceId()` and `BrowserWindow.moveAbove(mediaSourceId)`. [#18926](https://github.com/electron/electron/pull/18926)
* Added support for `will-move` event on macOS. [#19641](https://github.com/electron/electron/pull/19641)
* Documented previously undocumented `crashReporter.getCrashesDirectory()`. [#20417](https://github.com/electron/electron/pull/20417)
* `dialog` API changes:
* Added `dontAddToRecent` property to `dialog.showOpenDialog` and `dialog.showOpenDialogSync` to prevent documents from being added to recent documents on Windows in open dialogs. [#19669](https://github.com/electron/electron/pull/19669)
* Added property customization to `dialog.showSaveDialog` and `dialog.showSaveDialogSync`. [#19672](https://github.com/electron/electron/pull/19672)
* `Notification` API changes:
* Added `timeoutType` option to allow Linux/Windows users to set the type of notification timeout. [#20153](https://github.com/electron/electron/pull/20153)
* Added `urgency` option to set urgency on Linux notifications. [#20152](https://github.com/electron/electron/pull/20152)
* `session` API changes:
* Updated documentation on `session.setProxy(config)` and `session.setCertificateVerifyProc(proc)` to note optional options. [#19604](https://github.com/electron/electron/pull/19604)
* Added `session.downloadURL(url)` to allow to triggering downloads without a BrowserWindow. [#19889](https://github.com/electron/electron/pull/19889)
* Added support for HTTP preconnect resource hints via `session.preconnect(options)` and the `preconnect` event. [#18671](http://github.com/electron/electron/pull/18671)
* Added `session.addWordToSpellCheckerDictionary` to allow custom words in the dictionary [#21297](http://github.com/electron/electron/pull/21297)
* Added option to `shell.moveItemToTrash(fullPath[, deleteOnFail])` on macOS to specify what happens when moveItemToTrash fails. [#19700](https://github.com/electron/electron/pull/19700)
* `systemPreferences` API changes:
* Updated `systemPreferences.getColor(color)` documentation for macOS. [#20611](https://github.com/electron/electron/pull/20611)
* Added `screen` media type to `systemPreferences.getMediaAccessStatus()`. [#20764](https://github.com/electron/electron/pull/20764)
* Added `nativeTheme.themeSource` to allow apps to override Chromium and the OS's theme choice. [#19960](https://github.com/electron/electron/pull/19960)
* TouchBar API changes:
* Added `accessibilityLabel` property to `TouchBarButton` and `TouchBarLabel` to improve TouchBarButton/TouchBarLabel accessibility. [#20454](https://github.com/electron/electron/pull/20454)
* Updated TouchBar related documentation [#19444](https://github.com/electron/electron/pull/19444)
* `tray` API changes:
* Added new options to `tray.displayBalloon()`: `iconType`, `largeIcon`, `noSound` and `respectQuietTime`. [#19544](https://github.com/electron/electron/pull/19544)
* Added tray.removeBalloon(), which removes an already displayed balloon notification. [#19547](https://github.com/electron/electron/pull/19547)
* Added tray.focus(), which returns focus to the taskbar notification area. feat: add tray.focus() [#19548](https://github.com/electron/electron/pull/19548)
* `webContents` API changes:
* Added `contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture])` to expose executeJavaScriptInIsolatedWorld on the webContents API. [#21190](https://github.com/electron/electron/pull/21190)
* Added methods to capture a hidden webContents. [#21679](https://github.com/electron/electron/pull/21679)
* Added options to `webContents.print([options], [callback])` to enable customization of print page headers and footers. [#19688](https://github.com/electron/electron/pull/19688)
* Added ability to inspect specific shared workers via `webContents.getAllSharedWorkers()` and `webContents.inspectSharedWorkerById(workerId)`. [#20389](https://github.com/electron/electron/pull/20389)
* Added the support of `fitToPageEnabled` and `scaleFactor` options in WebContents.printToPDF(). [#20436](https://github.com/electron/electron/pull/20436)
* Updated `webview.printToPDF` documentation to indicate return type is now Uint8Array. [#20505](https://github.com/electron/electron/pull/20505)
- `app` API changes:
- Added `app.getApplicationNameForProtocol(url)`. [#20399](https://github.com/electron/electron/pull/20399)
- Added `app.showAboutPanel()` and `app.setAboutPanelOptions(options)` support on Windows. [#19420](https://github.com/electron/electron/pull/19420)
- `BrowserWindow` API changes:
- Updated docs to note that BrowserWindow options `hasShadow` is available on all platforms [#20038](https://github.com/electron/electron/pull/20038)
- Added `trafficLightPosition` option to BrowserWindow options to allow custom positioning for traffic light buttons. [#21781](https://github.com/electron/electron/pull/21781)
- Added `accessibleTitle` option to BrowserWindow for setting the accessible window title [#19698](https://github.com/electron/electron/pull/19698)
- `BrowserWindow.fromWebContents()` can now return null [#19983](https://github.com/electron/electron/pull/19983)
- Added `BrowserWindow.getMediaSourceId()` and `BrowserWindow.moveAbove(mediaSourceId)`. [#18926](https://github.com/electron/electron/pull/18926)
- Added support for `will-move` event on macOS. [#19641](https://github.com/electron/electron/pull/19641)
- Documented previously undocumented `crashReporter.getCrashesDirectory()`. [#20417](https://github.com/electron/electron/pull/20417)
- `dialog` API changes:
- Added `dontAddToRecent` property to `dialog.showOpenDialog` and `dialog.showOpenDialogSync` to prevent documents from being added to recent documents on Windows in open dialogs. [#19669](https://github.com/electron/electron/pull/19669)
- Added property customization to `dialog.showSaveDialog` and `dialog.showSaveDialogSync`. [#19672](https://github.com/electron/electron/pull/19672)
- `Notification` API changes:
- Added `timeoutType` option to allow Linux/Windows users to set the type of notification timeout. [#20153](https://github.com/electron/electron/pull/20153)
- Added `urgency` option to set urgency on Linux notifications. [#20152](https://github.com/electron/electron/pull/20152)
- `session` API changes:
- Updated documentation on `session.setProxy(config)` and `session.setCertificateVerifyProc(proc)` to note optional options. [#19604](https://github.com/electron/electron/pull/19604)
- Added `session.downloadURL(url)` to allow to triggering downloads without a BrowserWindow. [#19889](https://github.com/electron/electron/pull/19889)
- Added support for HTTP preconnect resource hints via `session.preconnect(options)` and the `preconnect` event. [#18671](http://github.com/electron/electron/pull/18671)
- Added `session.addWordToSpellCheckerDictionary` to allow custom words in the dictionary [#21297](http://github.com/electron/electron/pull/21297)
- Added option to `shell.moveItemToTrash(fullPath[, deleteOnFail])` on macOS to specify what happens when moveItemToTrash fails. [#19700](https://github.com/electron/electron/pull/19700)
- `systemPreferences` API changes:
- Updated `systemPreferences.getColor(color)` documentation for macOS. [#20611](https://github.com/electron/electron/pull/20611)
- Added `screen` media type to `systemPreferences.getMediaAccessStatus()`. [#20764](https://github.com/electron/electron/pull/20764)
- Added `nativeTheme.themeSource` to allow apps to override Chromium and the OS's theme choice. [#19960](https://github.com/electron/electron/pull/19960)
- TouchBar API changes:
- Added `accessibilityLabel` property to `TouchBarButton` and `TouchBarLabel` to improve TouchBarButton/TouchBarLabel accessibility. [#20454](https://github.com/electron/electron/pull/20454)
- Updated TouchBar related documentation [#19444](https://github.com/electron/electron/pull/19444)
- `tray` API changes:
- Added new options to `tray.displayBalloon()`: `iconType`, `largeIcon`, `noSound` and `respectQuietTime`. [#19544](https://github.com/electron/electron/pull/19544)
- Added tray.removeBalloon(), which removes an already displayed balloon notification. [#19547](https://github.com/electron/electron/pull/19547)
- Added tray.focus(), which returns focus to the taskbar notification area. feat: add tray.focus() [#19548](https://github.com/electron/electron/pull/19548)
- `webContents` API changes:
- Added `contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture])` to expose executeJavaScriptInIsolatedWorld on the webContents API. [#21190](https://github.com/electron/electron/pull/21190)
- Added methods to capture a hidden webContents. [#21679](https://github.com/electron/electron/pull/21679)
- Added options to `webContents.print([options], [callback])` to enable customization of print page headers and footers. [#19688](https://github.com/electron/electron/pull/19688)
- Added ability to inspect specific shared workers via `webContents.getAllSharedWorkers()` and `webContents.inspectSharedWorkerById(workerId)`. [#20389](https://github.com/electron/electron/pull/20389)
- Added the support of `fitToPageEnabled` and `scaleFactor` options in WebContents.printToPDF(). [#20436](https://github.com/electron/electron/pull/20436)
- Updated `webview.printToPDF` documentation to indicate return type is now Uint8Array. [#20505](https://github.com/electron/electron/pull/20505)
### Deprecated APIs
The following APIs are now deprecated:
* Deprecated the nonfunctional `visibleOnFullScreen` option within `BrowserWindow.setVisibleOnAllWorkspaces` prior to its removal in the next major release version. [#21732](https://github.com/electron/electron/pull/21732)
* Deprecated `alternate-selected-control-text` on `systemPreferences.getColor(color)` for macOS. [#20611](https://github.com/electron/electron/pull/20611)
* Deprecated `setLayoutZoomLevelLimits` on `webContents`, `webFrame`, and `<webview> Tag` because Chromium removed this capability. [#21296](https://github.com/electron/electron/pull/21296)
* The default value of `false` for `app.allowRendererProcessReuse` is now deprecated. [#21287](https://github.com/electron/electron/pull/21287)
* Deprecated `<webview>.getWebContents()` as it depends on the remote module. [#20726](https://github.com/electron/electron/pull/20726)
- Deprecated the nonfunctional `visibleOnFullScreen` option within `BrowserWindow.setVisibleOnAllWorkspaces` prior to its removal in the next major release version. [#21732](https://github.com/electron/electron/pull/21732)
- Deprecated `alternate-selected-control-text` on `systemPreferences.getColor(color)` for macOS. [#20611](https://github.com/electron/electron/pull/20611)
- Deprecated `setLayoutZoomLevelLimits` on `webContents`, `webFrame`, and `<webview> Tag` because Chromium removed this capability. [#21296](https://github.com/electron/electron/pull/21296)
- The default value of `false` for `app.allowRendererProcessReuse` is now deprecated. [#21287](https://github.com/electron/electron/pull/21287)
- Deprecated `<webview>.getWebContents()` as it depends on the remote module. [#20726](https://github.com/electron/electron/pull/20726)
## End of Support for 5.x.y
@ -111,4 +117,5 @@ In the short term, you can expect the team to continue to focus on keeping up wi
For information on planned breaking changes in upcoming versions of Electron, [see our Planned Breaking Changes doc](https://github.com/electron/electron/blob/master/docs/breaking-changes.md).
### Deprecation of `remote` Module (Starting in Electron 9)
Due to serious security liabilities, we are beginning plans to deprecate the [`remote` module](https://www.electronjs.org/docs/api/remote) starting in Electron 9. You can read and follow [this issue](https://github.com/electron/electron/issues/21408) that details our reasons for this and includes a proposed timeline for deprecation.

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: electron-9-0
---
Electron 9.0.0 has been released! It includes upgrades to Chromium `83`, V8 `8.3`, and Node.js `12.14`. We've added several new API integrations for our spellchecker feature, enabled PDF viewer, and much more!
---
@ -20,55 +21,55 @@ The Electron team is excited to announce the release of Electron 9.0.0! You can
### Stack Changes
* Chromium `83.0.4103.64`
* [New in Chrome 81](https://developers.google.com/web/updates/2020/04/nic81)
* [Chrome 82 was skipped](https://chromereleases.googleblog.com/2020/03/chrome-and-chrome-os-release-updates.html)
* [New in Chrome 83](https://developers.google.com/web/updates/2020/05/nic83)
* Node.js `12.14.1`
* [Node 12.14.1 blog post](https://nodejs.org/en/blog/release/v12.14.1/)
* V8 `8.3`
* [V8 8.1 blog post](https://v8.dev/blog/v8-release-81)
* [V8 8.3 blog post](https://v8.dev/blog/v8-release-83)
- Chromium `83.0.4103.64`
- [New in Chrome 81](https://developers.google.com/web/updates/2020/04/nic81)
- [Chrome 82 was skipped](https://chromereleases.googleblog.com/2020/03/chrome-and-chrome-os-release-updates.html)
- [New in Chrome 83](https://developers.google.com/web/updates/2020/05/nic83)
- Node.js `12.14.1`
- [Node 12.14.1 blog post](https://nodejs.org/en/blog/release/v12.14.1/)
- V8 `8.3`
- [V8 8.1 blog post](https://v8.dev/blog/v8-release-81)
- [V8 8.3 blog post](https://v8.dev/blog/v8-release-83)
### Highlight Features
* Multiple improvements to the spellchecker feature. See more details in [#22128](https://github.com/electron/electron/pull/22128) and [#22368](https://github.com/electron/electron/pull/22368).
* Improved window events handler efficiency on Linux. [#23260](https://github.com/electron/electron/pull/23260).
* Enable PDF viewer. [#22131](https://github.com/electron/electron/pull/22131).
- Multiple improvements to the spellchecker feature. See more details in [#22128](https://github.com/electron/electron/pull/22128) and [#22368](https://github.com/electron/electron/pull/22368).
- Improved window events handler efficiency on Linux. [#23260](https://github.com/electron/electron/pull/23260).
- Enable PDF viewer. [#22131](https://github.com/electron/electron/pull/22131).
See the [9.0.0 release notes](https://github.com/electron/electron/releases/tag/v9.0.0) for a full list of new features and changes.
## Breaking Changes
* Deprecation warning when using `remote` without `enableRemoteModule: true`. [#21546](https://github.com/electron/electron/pull/21546)
* This is the first step in our plans for deprecating the `remote` module and moving it to userland. You can read and follow [this issue](https://github.com/electron/electron/issues/21408) that details our reasons for this and includes a proposed timeline for deprecation.
* Set `app.enableRendererProcessReuse` to true by default. [#22336](https://github.com/electron/electron/pull/22336)
* This is continued work for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Full info and proposed timeline is detailed in [this issue](https://github.com/electron/electron/issues/18397).
* Sending non-JavaScript objects over IPC now throws an exception. [#21560](https://github.com/electron/electron/pull/21560)
* This behavior was depreciated in Electron 8.0. In Electron 9.0, the old serialization algorithm has been removed, and sending such non-serializable objects will now throw an "object could not be cloned" error.
- Deprecation warning when using `remote` without `enableRemoteModule: true`. [#21546](https://github.com/electron/electron/pull/21546)
- This is the first step in our plans for deprecating the `remote` module and moving it to userland. You can read and follow [this issue](https://github.com/electron/electron/issues/21408) that details our reasons for this and includes a proposed timeline for deprecation.
- Set `app.enableRendererProcessReuse` to true by default. [#22336](https://github.com/electron/electron/pull/22336)
- This is continued work for a future requirement that native Node modules loaded in the renderer process be either [N-API](https://nodejs.org/api/n-api.html) or [Context Aware](https://nodejs.org/api/addons.html#addons_context_aware_addons). Full info and proposed timeline is detailed in [this issue](https://github.com/electron/electron/issues/18397).
- Sending non-JavaScript objects over IPC now throws an exception. [#21560](https://github.com/electron/electron/pull/21560)
- This behavior was depreciated in Electron 8.0. In Electron 9.0, the old serialization algorithm has been removed, and sending such non-serializable objects will now throw an "object could not be cloned" error.
More information about these and future changes can be found on the [Planned Breaking Changes](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) page.
## API Changes
* `shell` API changes:
* The `shell.openItem` API has been replaced with an asynchronous `shell.openPath API`. [proposal](https://github.com/electron/governance/blob/master/wg-api/spec-documents/shell-openitem.md)
* `session`API changes:
* Added `session.listWordsFromSpellCheckerDictionary` API to list custom words in the dictionary. [#22128](https://github.com/electron/electron/pull/22128)
* Added `session.removeWordFromSpellCheckerDictionary` API to remove custom words in the dictionary. [#22368](https://github.com/electron/electron/pull/22368)
* Added `session.serviceWorkerContext` API to access basic service worker info and receive console logs from service workers. [#22313](https://github.com/electron/electron/pull/22313)
* `app` API changes:
* Added a new force parameter to `app.focus()` on macOS to allow apps to forcefully take focus. [#23447](https://github.com/electron/electron/pull/23447)
* `BrowserWindow` API changes:
* Added support for property access to some getter/setter pairs on `BrowserWindow`. [#23208](https://github.com/electron/electron/pull/23208)
- `shell` API changes:
- The `shell.openItem` API has been replaced with an asynchronous `shell.openPath API`. [proposal](https://github.com/electron/governance/blob/master/wg-api/spec-documents/shell-openitem.md)
- `session`API changes:
- Added `session.listWordsFromSpellCheckerDictionary` API to list custom words in the dictionary. [#22128](https://github.com/electron/electron/pull/22128)
- Added `session.removeWordFromSpellCheckerDictionary` API to remove custom words in the dictionary. [#22368](https://github.com/electron/electron/pull/22368)
- Added `session.serviceWorkerContext` API to access basic service worker info and receive console logs from service workers. [#22313](https://github.com/electron/electron/pull/22313)
- `app` API changes:
- Added a new force parameter to `app.focus()` on macOS to allow apps to forcefully take focus. [#23447](https://github.com/electron/electron/pull/23447)
- `BrowserWindow` API changes:
- Added support for property access to some getter/setter pairs on `BrowserWindow`. [#23208](https://github.com/electron/electron/pull/23208)
### Deprecated APIs
The following APIs are now deprecated or removed:
* `shell.openItem` API is now depreciated, and replaced with an asynchronous `shell.openPath API`.
* `<webview>.getWebContents`, which was deprecated in Electron 8.0, is now removed.
* `webFrame.setLayoutZoomLevelLimits`, which was deprecated in Electron 8.0, is now removed.
- `shell.openItem` API is now depreciated, and replaced with an asynchronous `shell.openPath API`.
- `<webview>.getWebContents`, which was deprecated in Electron 8.0, is now removed.
- `webFrame.setLayoutZoomLevelLimits`, which was deprecated in Electron 8.0, is now removed.
## End of Support for 6.x.y

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zcbenz.png?size=96'
slug: electron-api-changes
---
Since the beginning of Electron, starting way back when it used to be called Atom-Shell, we have been experimenting with providing a nice cross-platform JavaScript API for Chromium's content module and native GUI components. The APIs started very organically, and over time we have made several changes to improve the initial designs.
---
@ -22,15 +23,15 @@ By default, warnings will show if you are using deprecated APIs. To turn them of
Built-in modules are now grouped into one module, instead of being separated into independent modules, so you can use them [without conflicts with other modules][issue-387]:
```javascript
var app = require('electron').app
var BrowserWindow = require('electron').BrowserWindow
var app = require('electron').app;
var BrowserWindow = require('electron').BrowserWindow;
```
The old way of `require('app')` is still supported for backward compatibility, but you can also turn if off:
```javascript
require('electron').hideInternalModules()
require('app') // throws error.
require('electron').hideInternalModules();
require('app'); // throws error.
```
## An easier way to use the `remote` module
@ -39,16 +40,16 @@ Because of the way using built-in modules has changed, we have made it easier to
```javascript
// New way.
var app = require('electron').remote.app
var BrowserWindow = require('electron').remote.BrowserWindow
var app = require('electron').remote.app;
var BrowserWindow = require('electron').remote.BrowserWindow;
```
Instead of using a long require chain:
```javascript
// Old way.
var app = require('electron').remote.require('app')
var BrowserWindow = require('electron').remote.require('BrowserWindow')
var app = require('electron').remote.require('app');
var BrowserWindow = require('electron').remote.require('BrowserWindow');
```
## Splitting the `ipc` module
@ -57,20 +58,20 @@ The `ipc` module existed on both the main process and renderer process and the A
```javascript
// In main process.
var ipcMain = require('electron').ipcMain
var ipcMain = require('electron').ipcMain;
```
```javascript
// In renderer process.
var ipcRenderer = require('electron').ipcRenderer
var ipcRenderer = require('electron').ipcRenderer;
```
And for the `ipcRenderer` module, an extra `event` object has been added when receiving messages, to match how messages are handled in `ipcMain` modules:
```javascript
ipcRenderer.on('message', function (event) {
console.log(event)
})
console.log(event);
});
```
## Standardizing `BrowserWindow` options
@ -78,15 +79,15 @@ ipcRenderer.on('message', function (event) {
The `BrowserWindow` options had different styles based on the options of other APIs, and were a bit hard to use in JavaScript because of the `-` in the names. They are now standardized to the traditional JavaScript names:
```javascript
new BrowserWindow({ minWidth: 800, minHeight: 600 })
new BrowserWindow({ minWidth: 800, minHeight: 600 });
```
## Following DOM's conventions for API names
The API names in Electron used to prefer camelCase for all API names, like `Url` to `URL`, but the DOM has its own conventions, and they prefer `URL` to `Url`, while using `Id` instead of `ID`. We have done the following API renames to match the DOM's styles:
* `Url` is renamed to `URL`
* `Csp` is renamed to `CSP`
- `Url` is renamed to `URL`
- `Csp` is renamed to `CSP`
You will notice lots of deprecations when using Electron v0.35.0 for your app because of these changes. An easy way to fix them is to replace all instances of `Url` with `URL`.
@ -94,8 +95,8 @@ You will notice lots of deprecations when using Electron v0.35.0 for your app be
The style of `Tray` event names was a bit different from other modules so a rename has been done to make it match the others.
* `clicked` is renamed to `click`
* `double-clicked` is renamed to `double-click`
* `right-clicked` is renamed to `right-click`
- `clicked` is renamed to `click`
- `double-clicked` is renamed to `double-click`
- `right-clicked` is renamed to `right-click`
[issue-387]: https://github.com/electron/electron/issues/387

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: electron-doumentation
---
This week we've given Electron's documentation a home on [electronjs.org](https://electronjs.org). You can visit [/docs/latest](https://electronjs.org/docs/latest) for the latest set of docs. We'll keep versions of older docs, too, so you're able to visit [/docs/vX.XX.X](https://electronjs.org/docs/v0.26.0) for the docs that correlate to the version you're using.
---
@ -73,9 +74,9 @@ In the site's `_config.yml` file a variable `latest_version` is set every time t
```yaml
latest_version: v0.27.0
available_versions:
- v0.27.0
- v0.27.0
collections:
docs: {output: true, permalink: '/docs/:path/'}
docs: { output: true, permalink: '/docs/:path/' }
```
The file `latest.md` in our site root is empty except for this front matter which allows users to see the index (aka `README`) of the latest version of docs by visiting this URL, [electron.atom.io/docs/latest](https://electronjs.org/docs/latest), rather than using the latest version number specifically (though you can do that, too).
@ -92,22 +93,19 @@ redirect_to: /docs/{{ site.data.releases[0].version }}
In the `docs.html` layout template we use conditionals to either show or hide information in the header and breadcrumb.
```html
{% raw %}
{% if page.category != 'ignore' %}
<h6 class='docs-breadcrumb'>{{ page.version }} / {{ page.category }}
{% if page.title != 'README' %} / {{ page.title }} {% endif %}</h6>
{% endif %}
{% endraw %}
{% raw %} {% if page.category != 'ignore' %}
<h6 class="docs-breadcrumb">
{{ page.version }} / {{ page.category }} {% if page.title != 'README' %} / {{
page.title }} {% endif %}
</h6>
{% endif %} {% endraw %}
```
To create a page showing the versions that are available we just loop through the list in our config on a file, `versions.md`, in the site's root. Also we give this page a permalink: `/docs/`
```html
{% raw %}
{% for version in site.available_versions %}
- [{{ version }}](/docs/{{ version }})
{% endfor %}
{% endraw %}
{% raw %} {% for version in site.available_versions %} - [{{ version
}}](/docs/{{ version }}) {% endfor %} {% endraw %}
```
Hope you enjoyed these technical bits! If you're interested in more information on using Jekyll for documentation sites, checkout how GitHub's docs team publishes [GitHub's docs on Jekyll](https://github.com/blog/1939-how-github-uses-github-to-document-github).

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zcbenz.png?size=96'
slug: electron-internals-building-chromium-as-a-library
---
Electron is based on Google's open-source Chromium, a project that is not
necessarily designed to be used by other projects. This post introduces
how Chromium is built as a library for Electron's use, and how the build

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zcbenz.png?size=96'
slug: electron-internals-node-integration
---
This is the first post of a series that explains the internals of Electron. This
post introduces how Node's event loop is integrated with Chromium in Electron.
@ -79,7 +80,7 @@ You can find the implemention of the message loop integration in the
`node_bindings` files under [`electron/atom/common/`][node-bindings]. It can be
easily reused for projects that want to integrate Node.
*Update: Implementation moved to [`electron/shell/common/node_bindings.cc`][node-bindings-updated].*
_Update: Implementation moved to [`electron/shell/common/node_bindings.cc`][node-bindings-updated]._
[node-gui]: https://github.com/zcbenz/node-gui
[node-qt]: https://github.com/arturadib/node-qt

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zcbenz.png?size=96'
slug: electron-internals-using-node-as-a-library
---
This is the second post in an ongoing series explaining the internals of
Electron. Check out the [first post][event-loop] about event loop integration
if you haven't already.

Просмотреть файл

@ -7,11 +7,12 @@ authors:
image_url: 'https://github.com/zcbenz.png?size=96'
slug: electron-internals-weak-references
---
As a language with garbage collection, JavaScript frees users from managing
resources manually. But because Electron hosts this environment, it has to be
very careful avoiding both memory and resources leaks.
This post introduces the concept of weak references and how they are used to
This post introduces the concept of weak references and how they are used to
manage resources in Electron.
---
@ -44,7 +45,7 @@ are gone.
There is no way to directly test weak references in raw JavaScript since the
language doesn't have a way to assign weak references. The only API in
JavaScript related to weak references is [WeakMap][WeakMap], but since it only
JavaScript related to weak references is [WeakMap][weakmap], but since it only
creates weak-reference keys, it is impossible to know when an object has been
garbage collected.
@ -54,17 +55,17 @@ to the passed object and calls the callback when the object is garbage collected
```javascript
// Code below can only run on Electron < v0.37.8.
var v8Util = process.atomBinding('v8_util')
var v8Util = process.atomBinding('v8_util');
var object = {}
var object = {};
v8Util.setDestructor(object, function () {
console.log('The object is garbage collected')
})
console.log('The object is garbage collected');
});
// Remove all references to the object.
object = undefined
object = undefined;
// Manually starts a GC.
gc()
gc();
// Console prints "The object is garbage collected".
```
@ -93,10 +94,10 @@ For example, without proper implementation, following code would cause memory
leaks quickly:
```javascript
const {remote} = require('electron')
const { remote } = require('electron');
for (let i = 0; i < 10000; ++i) {
remote.nativeImage.createEmpty()
remote.nativeImage.createEmpty();
}
```
@ -107,41 +108,41 @@ renderer process. In the renderer process, the `remote` module will receive
the ID and wrap it with a proxy object and when the proxy object is garbage
collected, a message will be sent to the main process to free the object.
Using `remote.require` API as an example, a simplified implementation looks
Using `remote.require` API as an example, a simplified implementation looks
like this:
```javascript
remote.require = function (name) {
// Tell the main process to return the metadata of the module.
const meta = ipcRenderer.sendSync('REQUIRE', name)
const meta = ipcRenderer.sendSync('REQUIRE', name);
// Create a proxy object.
const object = metaToValue(meta)
const object = metaToValue(meta);
// Tell the main process to free the object when the proxy object is garbage
// collected.
v8Util.setDestructor(object, function () {
ipcRenderer.send('FREE', meta.id)
})
return object
}
ipcRenderer.send('FREE', meta.id);
});
return object;
};
```
In the main process:
```javascript
const map = {}
const id = 0
const map = {};
const id = 0;
ipcMain.on('REQUIRE', function (event, name) {
const object = require(name)
const object = require(name);
// Add a reference to the object.
map[++id] = object
map[++id] = object;
// Convert the object to metadata.
event.returnValue = valueToMeta(id, object)
})
event.returnValue = valueToMeta(id, object);
});
ipcMain.on('FREE', function (event, id) {
delete map[id]
})
delete map[id];
});
```
## Maps with weak values
@ -158,10 +159,10 @@ collection.
For example, the following code:
```javascript
const {remote} = require('electron')
const { remote } = require('electron');
for (let i = 0; i < 10000; ++i) {
remote.getCurrentWindow()
remote.getCurrentWindow();
}
```
@ -175,7 +176,7 @@ instead of creating a new one.
This is not possible with the API in JavaScript core. Using the normal map
to cache objects will prevent V8 from garbage collecting the objects, while the
[WeakMap][WeakMap] class can only use objects as weak keys.
[WeakMap][weakmap] class can only use objects as weak keys.
To solve this, a map type with values as weak references is added, which is
perfect for caching objects with IDs. Now the `remote.require` looks like
@ -206,14 +207,14 @@ found in following files:
The `setDestructor` API:
* [`object_life_monitor.cc`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/object_life_monitor.cc)
* [`object_life_monitor.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/object_life_monitor.h)
- [`object_life_monitor.cc`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/object_life_monitor.cc)
- [`object_life_monitor.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/object_life_monitor.h)
The `createIDWeakMap` API:
* [`key_weak_map.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/key_weak_map.h)
* [`atom_api_key_weak_map.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/atom_api_key_weak_map.h)
- [`key_weak_map.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/key_weak_map.h)
- [`atom_api_key_weak_map.h`](https://github.com/electron/electron/blob/v1.3.4/atom/common/api/atom_api_key_weak_map.h)
[window-disappearing]: https://electronjs.org/docs/faq/#my-apps-windowtray-disappeared-after-a-few-minutes
[WeakMap]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
[weakmap]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
[remote-procedure-call]: https://en.wikipedia.org/wiki/Remote_procedure_call

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/felixrieseberg.png?size=96'
slug: electron-joins-openjsf
---
At [Node+JS Interactive](https://events19.linuxfoundation.org/events/nodejs-interactive-2019/) in Montreal, the [OpenJS Foundation](https://openjsf.org/) announced that it accepted Electron into the Foundation's incubation program. The Foundation is committed to supporting the healthy growth of the JavaScript ecosystem and web technologies by providing a neutral organization to host and sustain projects, as well as collaboratively fund activities for the benefit of the community at large.
The OpenJS Foundation is host to a number of open source JavaScript projects including jQuery, Node.js, and webpack. It's supported by 30 corporate and end-user members, including GoDaddy, Google, IBM, Intel, Joyent, and Microsoft. Electron is an open–source framework for building cross-platform desktop applications with web technologies.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: electron-meetup
---
Join us September 29th at GitHub's HQ for an Electron meetup hosted by Atom team members [@jlord](https://github.com/jlord) and [@kevinsawicki](https://github.com/kevinsawicki). There will be talks, food to snack on, and time to hangout and meet others doing cool things with Electron. We'll also have a bit of time to do lightning talks for those interested. Hope to see you there!
---
@ -15,7 +16,7 @@ Join us September 29th at GitHub's HQ for an Electron meetup hosted by Atom team
- **Jonathan Ross** and **Francois Laberge** from [Jibo](http://jibo.com) will share how they use Electron to animate a robot.
- **Jessica Lord** will talk about building a teaching tool, [Git-it](https://github.com/jlord/git-it-electron), on Electron.
- **Tom Moor** will talk about the pros and cons of building video and screen sharing on Electron with [speak.io](https://speak.io).
- **Tom Moor** will talk about the pros and cons of building video and screen sharing on Electron with [speak.io](https://speak.io).
- **Ben Gotow** will preview N1: [The Nylas Mail Client](https://www.nylas.com/blog/splitting-the-atom) and talk about developing it on Electron.
### Details

Просмотреть файл

@ -7,7 +7,8 @@ authors:
image_url: 'https://github.com/VerteDinde.png?size=96'
slug: electron-openjs-impact-project
---
At [OpenJS World](https://events.linuxfoundation.org/openjs-world/) this morning, we announced that Electron has officially graduated from the [OpenJS Foundation's](https://openjsf.org/) incubation program, and is now an OpenJS Foundation Impact Project.
At [OpenJS World](https://events.linuxfoundation.org/openjs-world/) this morning, we announced that Electron has officially graduated from the [OpenJS Foundation's](https://openjsf.org/) incubation program, and is now an OpenJS Foundation Impact Project.
Electron [entered incubation in December of 2019](https://openjsf.org/blog/2019/12/11/electron-joins-the-openjs-foundation/), at the last OpenJS Foundation global conference in Montreal. We're excited to take a larger role in the JavaScript community as an Impact Project, and continue our partnership with the OpenJS Foundation.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: electron-podcasts
---
Looking for an introduction to Electron? Two new podcasts have just been released that give a great overview of what it is, why it was built, and how it is being used.
---

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: electron-updates-mac-app-store-and-windows-auto-updater
---
Recently Electron added two exciting features: a Mac App Store compatible build and a built-in Windows auto updater.
---

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/kevinsawicki.png?size=96'
slug: electron
---
Atom Shell is now called Electron. You can learn more about Electron and what people are building with it at its new home [electronjs.org][electron].
---

Просмотреть файл

@ -7,9 +7,10 @@ authors:
image_url: 'https://github.com/marshallofsound.png?size=96'
slug: filereader-fix
---
A High severity vulnerability has been discovered in Chrome which affects all software based on Chromium, including Electron.
This vulnerability has been assigned `CVE-2019-5786`. You can read more about it in the [Chrome Blog Post](https://chromereleases.googleblog.com/2019/03/stable-channel-update-for-desktop.html).
This vulnerability has been assigned `CVE-2019-5786`. You can read more about it in the [Chrome Blog Post](https://chromereleases.googleblog.com/2019/03/stable-channel-update-for-desktop.html).
Please note that Chrome has reports of this vulnerability being used in the wild so it is strongly recommended you upgrade Electron ASAP.
@ -24,17 +25,19 @@ This affects any Electron application that may run third-party or untrusted Java
Affected apps should upgrade to a patched version of Electron.
We've published new versions of Electron which include fixes for this vulnerability:
* [4.0.8](https://github.com/electron/electron/releases/tag/v4.0.8)
* [3.1.6](https://github.com/electron/electron/releases/tag/v3.1.6)
* [3.0.16](https://github.com/electron/electron/releases/tag/v3.0.16)
* [2.0.18](https://github.com/electron/electron/releases/tag/v2.0.18)
- [4.0.8](https://github.com/electron/electron/releases/tag/v4.0.8)
- [3.1.6](https://github.com/electron/electron/releases/tag/v3.1.6)
- [3.0.16](https://github.com/electron/electron/releases/tag/v3.0.16)
- [2.0.18](https://github.com/electron/electron/releases/tag/v2.0.18)
The latest beta of Electron 5 was tracking Chromium 73 and therefore is already patched:
* [5.0.0-beta.5](https://github.com/electron/electron/releases/tag/v5.0.0-beta.5)
- [5.0.0-beta.5](https://github.com/electron/electron/releases/tag/v5.0.0-beta.5)
## Further Information
This vulnerability was discovered by Clement Lecigne of Google's Threat Analysis Group and reported to the Chrome team. The Chrome blog post can be found [here](https://chromereleases.googleblog.com/2019/03/stable-channel-update-for-desktop.html).
This vulnerability was discovered by Clement Lecigne of Google's Threat Analysis Group and reported to the Chrome team. The Chrome blog post can be found [here](https://chromereleases.googleblog.com/2019/03/stable-channel-update-for-desktop.html).
To learn more about best practices for keeping your Electron apps secure, see our [security tutorial].

Просмотреть файл

@ -27,12 +27,13 @@ Keep on reading to see what's new and how your app can adopt Electron Forge!
[Electron Forge](https://electronforge.io) is a tool for packaging and distributing Electron applications. It unifies Electron's build tooling ecosystem into a single extensible interface so that anyone can jump right into making Electron apps.
Highlight features include:
* 📦 Application packaging and code signing
* 🚚 Customizable installers on Windows, macOS, and Linux (DMG, deb, MSI, PKG, AppX, etc.)
* ☁️ Automated publishing flow for cloud providers (GitHub, S3, Bitbucket, etc.)
* ⚡️ Easy-to-use boilerplate templates for webpack and TypeScript
* ⚙️ Native Node.js module support
* 🔌 Extensible JavaScript plugin API
- 📦 Application packaging and code signing
- 🚚 Customizable installers on Windows, macOS, and Linux (DMG, deb, MSI, PKG, AppX, etc.)
- ☁️ Automated publishing flow for cloud providers (GitHub, S3, Bitbucket, etc.)
- ⚡️ Easy-to-use boilerplate templates for webpack and TypeScript
- ⚙️ Native Node.js module support
- 🔌 Extensible JavaScript plugin API
:::info Further reading
@ -168,8 +169,7 @@ GitBook instance synced to the
[getting started]: https://www.electronforge.io/
[import documentation]: https://www.electronforge.io/import-existing-project
[webpack template]: https://www.electronforge.io/templates/webpack-template
[webpack + typescript template]: https://www.electronforge.io/templates/typescript-+-webpack-template
[Extending Electron Forge]: https://www.electronforge.io/advanced/extending-electron-forge
[Why Electron Forge]: https://www.electronforge.io/core-concepts/why-electron-forge
[extending electron forge]: https://www.electronforge.io/advanced/extending-electron-forge
[why electron forge]: https://www.electronforge.io/core-concepts/why-electron-forge

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/codebytere.png?size=96'
slug: from-native-to-js
---
How do Electron's features written in C++ or Objective-C get to JavaScript so they're available to an end-user?
---
@ -24,7 +25,7 @@ To trace this pathway, let's start with the [`app` module](https://electronjs.or
By opening the [`app.ts`](https://github.com/electron/electron/blob/0431997c8d64c9ed437b293e8fa15a96fc73a2a7/lib/browser/api/app.ts) file inside our `lib/` directory, you'll find the following line of code towards the top:
```js
const binding = process.electronBinding('app')
const binding = process.electronBinding('app');
```
This line points directly to Electron's mechanism for binding its C++/Objective-C modules to JavaScript for use by developers. This function is created by the header and [implementation file](https://github.com/electron/electron/blob/0431997c8d64c9ed437b293e8fa15a96fc73a2a7/atom/common/api/electron_bindings.cc) for the `ElectronBindings` class.
@ -37,7 +38,7 @@ When a top-level JavaScript module (like `app`) requires this native code, how i
## `native_mate`
At present, answers to this question can be found in `native_mate`: a fork of Chromium's [`gin` library](https://chromium.googlesource.com/chromium/src.git/+/lkgr/gin/) that makes it easier to marshal types between C++ and JavaScript.
At present, answers to this question can be found in `native_mate`: a fork of Chromium's [`gin` library](https://chromium.googlesource.com/chromium/src.git/+/lkgr/gin/) that makes it easier to marshal types between C++ and JavaScript.
Inside `native_mate/native_mate` there's a header and implementation file for `object_template_builder`. This is what allow us to form modules in native code whose shape conforms to what JavaScript developers would expect.

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: ghost
---
This week we chatted with [Felix Rieseberg](https://felixrieseberg.com/), desktop engineer at [Slack](https://slack.com/) and maintainer of [Ghost Desktop](https://ghost.org/downloads/), an Electron client for the [Ghost](https://ghost.org/) publishing platform.
---
@ -58,7 +59,7 @@ We would love to see Electron bring the operating system's native spellchecking
## What are your favorite things about Electron?
JavaScript is famous for being a vast ecosystem, involving countless tools and frameworks - but the convenience it affords us is hard to overstate. Building an app with Electron is only _slightly_ harder than building a web app, which is an amazing feat.
JavaScript is famous for being a vast ecosystem, involving countless tools and frameworks - but the convenience it affords us is hard to overstate. Building an app with Electron is only _slightly_ harder than building a web app, which is an amazing feat.
## Is Ghost done? If not, what's coming next?

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/nornagon.png?size=96'
slug: gn
---
Electron now uses GN to build itself. Here's a discussion of why.
---
@ -33,14 +34,13 @@ If you're developing an app with Electron, there are a few minor changes you mig
GN is [faster](https://chromium.googlesource.com/chromium/src/tools/gn/+/48062805e19b4697c5fbd926dc649c78b6aaa138/README.md) than GYP and its files are more readable and maintainable. Moreover, we hope that using a single build configuration system will reduce the work required to upgrade Electron to new versions of Chromium.
* It's already helped development on Electron 4.0.0 substantially because Chromium 67 removed support for MSVC and switched to building with Clang on Windows. With the GN build, we inherit all the compiler commands from Chromium directly, so we got the Clang build on Windows for free!
- It's already helped development on Electron 4.0.0 substantially because Chromium 67 removed support for MSVC and switched to building with Clang on Windows. With the GN build, we inherit all the compiler commands from Chromium directly, so we got the Clang build on Windows for free!
* It's also made it easier for Electron to use [BoringSSL] in a unified build across Electron, Chromium, and Node -- something that was [problematic before](https://electronjs.org/blog/electron-internals-using-node-as-a-library#shared-library-or-static-library).
- It's also made it easier for Electron to use [BoringSSL] in a unified build across Electron, Chromium, and Node -- something that was [problematic before](https://electronjs.org/blog/electron-internals-using-node-as-a-library#shared-library-or-static-library).
[BoringSSL]: https://boringssl.googlesource.com/boringssl/
[Electron code]: https://github.com/electron/electron
[GN]: https://gn.googlesource.com/gn/
[GYP]: https://gyp.gsrc.io/
[Ninja]: https://ninja-build.org/
[boringssl]: https://boringssl.googlesource.com/boringssl/
[electron code]: https://github.com/electron/electron
[gn]: https://gn.googlesource.com/gn/
[gyp]: https://gyp.gsrc.io/
[ninja]: https://ninja-build.org/
[libchromiumcontent]: https://github.com/electron/libchromiumcontent

Просмотреть файл

@ -10,6 +10,7 @@ authors:
image_url: 'https://github.com/sofianguy.png?size=96'
slug: governance
---
As Electron grows in popularity for desktop applications, the team working on it has also grown: we have more fulltime maintainers who work for different companies, live in different timezones, and have different interests. We're introducing a governance structure so we can keep growing smoothly.
---
@ -21,13 +22,14 @@ People in the Electron project coordinate in timezones around the world with vol
## Working Groups
Electron governance includes working groups that are responsible for different parts of the project. We're starting out with seven groups:
* Community & Safety: Handles [Code of Conduct](https://github.com/electron/governance/blob/master/CODE_OF_CONDUCT.md) issues.
* Docs & Tooling: Oversees externally-focused tooling (e.g. [Fiddle](https://electronjs.org/fiddle), [Forge](https://electronforge.io/)) and the Electron [documentation](https://electronjs.org/docs).
* Outreach: Helps grow the Electron community.
* Releases: Ensures releases are stable and on schedule.
* Security: Performs security testing and responds to security issues.
* Upgrades: Integrates upstream upgrades, such as new versions of V8, Chromium, and Node.
* Website: Maintains and improves [the Electron website](https://electronjs.org/).
- Community & Safety: Handles [Code of Conduct](https://github.com/electron/governance/blob/master/CODE_OF_CONDUCT.md) issues.
- Docs & Tooling: Oversees externally-focused tooling (e.g. [Fiddle](https://electronjs.org/fiddle), [Forge](https://electronforge.io/)) and the Electron [documentation](https://electronjs.org/docs).
- Outreach: Helps grow the Electron community.
- Releases: Ensures releases are stable and on schedule.
- Security: Performs security testing and responds to security issues.
- Upgrades: Integrates upstream upgrades, such as new versions of V8, Chromium, and Node.
- Website: Maintains and improves [the Electron website](https://electronjs.org/).
These groups will coordinate with each other, but each has their own meeting schedules and agendas to be productive on their own. More details on these groups are available at the [governance repository](https://github.com/electron/governance/blob/master/README.md).
@ -37,6 +39,6 @@ This shouldn't have any direct effect on Electron's direction. If our strategy i
## Where can I learn more?
* The governance [repo](https://github.com/electron/governance/) and [charter](https://github.com/electron/governance/tree/master/charter) have information about the new governance structure.
* Each working group has its own page: [Community](https://github.com/electron/governance/tree/master/wg-community-safety), [Docs & Tools](https://github.com/electron/governance/tree/master/wg-docs-tools), [Outreach](https://github.com/electron/governance/tree/master/wg-outreach), [Releases](https://github.com/electron/governance/tree/master/wg-releases), [Security](https://github.com/electron/governance/tree/master/wg-security), [Upgrades](https://github.com/electron/governance/tree/master/wg-upgrades), and [Website](https://github.com/electron/governance/tree/master/wg-website).
* You can contact the maintainers by [opening an issue](https://github.com/electron/governance/issues) or mailing us at [info@electronjs.org](mailto:info@electronjs.org).
- The governance [repo](https://github.com/electron/governance/) and [charter](https://github.com/electron/governance/tree/master/charter) have information about the new governance structure.
- Each working group has its own page: [Community](https://github.com/electron/governance/tree/master/wg-community-safety), [Docs & Tools](https://github.com/electron/governance/tree/master/wg-docs-tools), [Outreach](https://github.com/electron/governance/tree/master/wg-outreach), [Releases](https://github.com/electron/governance/tree/master/wg-releases), [Security](https://github.com/electron/governance/tree/master/wg-security), [Upgrades](https://github.com/electron/governance/tree/master/wg-upgrades), and [Website](https://github.com/electron/governance/tree/master/wg-website).
- You can contact the maintainers by [opening an issue](https://github.com/electron/governance/issues) or mailing us at [info@electronjs.org](mailto:info@electronjs.org).

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/vanessayuenn.png?size=96'
slug: i18n-updates
---
Ever since the [launch](https://electronjs.org/blog/new-website) of the new internationalized Electron website, we have been working hard to make the Electron development experience even more accessible to developers outside of the English speaking world.
So here we are with some exciting i18n updates!

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: in-app-purchases
---
The new Electron 2.0 release line is [packed](https://github.com/electron/electron/releases/tag/v2.0.0-beta.1) with new features and fixes. One of the highlights from this new major version is a new
[`inAppPurchase` API](https://github.com/electron/electron/blob/master/docs/api/in-app-purchase.md)
for Apple's [Mac App Store](https://support.apple.com/en-us/HT202023).

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: jasper
---
This week we interviewed the creator of [Jasper], an Electron-based tool for
managing GitHub notifications.
@ -74,41 +75,41 @@ I will introduce what kind of conditions can be used for stream.
### Users and Teams
| Stream | Issues |
| ---- | --- |
| `mentions:cat mentions:dog` | Issues that mention user `cat` or `dog`|
| `author:cat author:dog` | Issues created by user `cat` or `dog` |
| `assignee:cat assignee:dog` | Issues assigned to `cat` or `dog` |
| `commenter:cat commenter:dog` | Issues that `cat` or `dog` commented on |
| `involves:cat involves:dog` | Issues that "involve" `cat` or `bob` |
| Stream | Issues |
| --------------------------------------------- | --------------------------------------------------------------------- |
| `mentions:cat mentions:dog` | Issues that mention user `cat` or `dog` |
| `author:cat author:dog` | Issues created by user `cat` or `dog` |
| `assignee:cat assignee:dog` | Issues assigned to `cat` or `dog` |
| `commenter:cat commenter:dog` | Issues that `cat` or `dog` commented on |
| `involves:cat involves:dog` | Issues that "involve" `cat` or `bob` |
| `team:animal/white-cat team:animal/black-dog` | Issues that `animal/white-cat` or `animal/black-dog` are mentioned in |
`involves` means `mention`, `author`, `assignee` or `commenter`
### Repositories and Organizations
| Stream | Issues |
| --- | --- |
| `repo:cat/jump repo:dog/run` | Issues in `cat/jump` or `dog/run` |
| Stream | Issues |
| -------------------------------- | ------------------------------------ |
| `repo:cat/jump repo:dog/run` | Issues in `cat/jump` or `dog/run` |
| `org:electron user:cat user:dog` | Issues in `electron`, `cat` or `dog` |
`org` is same as `user`
### Attributes
| Stream | Issues |
| --- | --- |
| Stream | Issues |
| ------------------------------------------------- | -------------------------------------------------------------- |
| `repo:cat/jump milestone:v1.0.0 milestone:v1.0.1` | Issues that are attached to `v1.0.0` or `v1.0.1` in `cat/jump` |
| `repo:cat/jump label:bug label:blocker` | Issues that are attached `bug` **and** `blocker` in `cat/jump` |
| `electron OR atomshell` | Issues that include `electron` or `atomshell` |
| `repo:cat/jump label:bug label:blocker` | Issues that are attached `bug` **and** `blocker` in `cat/jump` |
| `electron OR atomshell` | Issues that include `electron` or `atomshell` |
### Review Status
| Stream | Issues |
| --- | --- |
| `is:pr review:required` | Issues that are required review in `cat/jump` |
| Stream | Issues |
| ---------------------------- | -------------------------------------------------------------------------------- |
| `is:pr review:required` | Issues that are required review in `cat/jump` |
| `is:pr review-requested:cat` | Issues that are requested review by `cat`. <br/> But these are not reviewed yet. |
| `is:pr reviewed-by:cat` | Issues that are reviewed by `cat` |
| `is:pr reviewed-by:cat` | Issues that are reviewed by `cat` |
<br/>
@ -151,8 +152,8 @@ I have a plan to develop the following features:
Follow [@jasperappio](https://twitter.com/jasperappio) on Twitter for updates.
[Jasper]: https://jasperapp.io
[Notifications API]: https://developer.github.com/v3/activity/notifications/
[Pull Requests API]: https://developer.github.com/v3/pulls/
[Issues API]: https://developer.github.com/v3/issues/
[Search API]: https://developer.github.com/v3/search/
[jasper]: https://jasperapp.io
[notifications api]: https://developer.github.com/v3/activity/notifications/
[pull requests api]: https://developer.github.com/v3/pulls/
[issues api]: https://developer.github.com/v3/issues/
[search api]: https://developer.github.com/v3/search/

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: july-2016-roundup
---
We're starting a monthly roundup to highlight activity in the Electron community. Each roundup will feature things like new apps, upcoming meetups, tools, videos, etc.
---
@ -18,12 +19,12 @@ If you've made an Electron app or host a meetup, make a [pull request](https://g
### New Apps
{: .table .table-ruled .table-full-width .table-with-spacious-first-column .mb-7}
| | | |
| | | |
| --- | --- | -- |
| <img src="/images/apps/demio.png" width="50"/> | [Demio](https://demio.com) | A Webinar platform built for inbound sales and marketing |
| <img src="/images/apps/electorrent.png" width="50"/> | [Electorrent](https://github.com/Tympanix/Electorrent) | A remote client app for uTorrent server |
| <img src="/images/apps/phonegap.png" width="50"/> | [PhoneGap](http://phonegap.com/products/#desktop-app-section) | The open source framework that gets you building amazing mobile apps using web technology |
| <img src="/images/apps/wordmark.png" width="50"/> | [WordMark](http://wordmarkapp.com) | A lightweight blog publishing editor for Markdown writers |
| <img src="/images/apps/wordmark.png" width="50"/> | [WordMark](http://wordmarkapp.com) | A lightweight blog publishing editor for Markdown writers |
| <img src="/images/apps/ubauth.png" width="50"/> | [UbAuth](http://ubauth.enytc.com) | App to help developers create access tokens for Uber applications with OAuth 2.0 |
| <img src="/images/apps/hyperterm.png" width="50"/> | [HyperTerm](https://hyperterm.org) | HTML/JS/CSS terminal |
| <img src="/images/apps/marp.png" width="50"/> | [Marp](https://yhatt.github.io/marp) | Markdown presentation writer |
@ -37,6 +38,6 @@ If you've made an Electron app or host a meetup, make a [pull request](https://g
### New Meetups
{: .table .table-ruled .table-full-width .table-with-spacious-first-column .mb-7}
| | |
| | |
| --- | -- |
| [Electron Open Source Desktop Framework](http://www.meetup.com/Electron-Open-Source-Desktop-Framework/) | London, UK |

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: kap
---
The Electron community is growing quickly, and people are creating powerful
new apps and tools at an astounding rate. To celebrate this creative momentum
and keep the community informed of some of these new projects, we've decided to
@ -28,13 +29,13 @@ a geodistributed team of freelance designers and developers.
## What is Kap?
[Kap is an open-source screen recorder](https://getkap.co) built primarily for designers and developers to easily capture their work. People use it to share animated prototypes, document bugs, create silly GIFs and everything in-between.
[Kap is an open-source screen recorder](https://getkap.co) built primarily for designers and developers to easily capture their work. People use it to share animated prototypes, document bugs, create silly GIFs and everything in-between.
We've seen people of all ages and backgrounds use it in educational settings, screencasts, tutorials... the list goes on. Even to create production assets! We're completely blown away by how well received our little side project has been.
## Why did you build it?
That's a very good question, it's not like there's a lack of screen recorders out there! We felt the alternatives were either too complex, too expensive or too limited. Nothing felt *just right* for our everyday needs. We also think it's great when the tools we use to do our work are open-source, that way everyone can help shape them. [Building Kap ended up being just as much about what we didn't do](https://medium.com/wulkano-friends/from-idea-to-product-and-beyond-a12850403c38). It's all in the details, an accumulation of small improvements that became the outline of a tool we wanted to use.
That's a very good question, it's not like there's a lack of screen recorders out there! We felt the alternatives were either too complex, too expensive or too limited. Nothing felt _just right_ for our everyday needs. We also think it's great when the tools we use to do our work are open-source, that way everyone can help shape them. [Building Kap ended up being just as much about what we didn't do](https://medium.com/wulkano-friends/from-idea-to-product-and-beyond-a12850403c38). It's all in the details, an accumulation of small improvements that became the outline of a tool we wanted to use.
However, and maybe most importantly, Kap has become a place for us to leave our worries at the door and just have fun building something for ourselves and people like us. It's so important to create an environment where you get to just vent, try new thins and enjoy your craft. No requirements, no pressure, no expectations. Should designers and developers side project? Why, yes. Yes, they should.
@ -42,13 +43,13 @@ However, and maybe most importantly, Kap has become a place for us to leave our
There were a number of reasons:
* Web tech
* Most of the team are web developers
* We're invested in JavaScript
* It opens the door for more people to contribute
* Electron itself is open-source
* The power and easily maintainable modularity of `node_modules`
* Cross-platform possibilities
- Web tech
- Most of the team are web developers
- We're invested in JavaScript
- It opens the door for more people to contribute
- Electron itself is open-source
- The power and easily maintainable modularity of `node_modules`
- Cross-platform possibilities
We think the future of apps are in the browser, but we're not quite there yet. Electron is an important step in the journey towards that future. It not only makes the apps themselves more accessible, but also the code they're built with. An interesting thought is imagining a future where the OS is a browser, and the tabs are essentially Electron apps.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/jlord.png?size=96'
slug: latest-v8-chromium-features
---
Building an Electron application means you only need to create one codebase and design for one browser, which is pretty handy. But because Electron stays up to date with [Node.js](http://nodejs.org) and [Chromium](https://www.chromium.org) as they release, you also get to make use of the great features they ship with. In some cases this eliminates dependencies you might have previously needed to include in a web app.
---
@ -26,10 +27,11 @@ findTime () => {
console.log(new Date())
}
```
**String Interpolation**
```js
var octocat = "Mona Lisa";
var octocat = 'Mona Lisa';
console.log(`The octocat's name is ${octocat}`);
```
@ -50,7 +52,7 @@ new Octocat();
**Array Includes**
```js
// Returns true
// Returns true
[1, 2].includes(2);
```
@ -59,8 +61,8 @@ new Octocat();
```js
// Represent indefinite number of arguments as an array
(o, c, ...args) => {
console.log(args.length)
}
console.log(args.length);
};
```
## Chromium Features

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/felixrieseberg.png?size=96'
slug: linux-32bit-support
---
The Electron team will discontinue support for 32-bit Linux (ia32 / i386) starting with Electron v4.0. The last version of Electron that supports 32-bit based installations of Linux is Electron v3.1, which will receive support releases until Electron v6 is released. Support for 64-bit based Linux and `armv7l` will continue unchanged.
---

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/ckerr.png?size=96'
slug: magellan-fix
---
A remote code execution vulnerability, "[Magellan](https://blade.tencent.com/magellan/index_en.html)," has been discovered affecting software based on SQLite or Chromium, including all versions of Electron.
---
@ -15,16 +16,16 @@ A remote code execution vulnerability, "[Magellan](https://blade.tencent.com/mag
Electron applications using Web SQL are impacted.
## Mitigation
Affected apps should stop using Web SQL or upgrade to a patched version of Electron.
We've published new versions of Electron which include fixes for this vulnerability:
* [4.0.0-beta.11](https://github.com/electron/electron/releases/tag/v4.0.0-beta.11)
* [3.1.0-beta.4](https://github.com/electron/electron/releases/tag/v3.1.0-beta.4)
* [3.0.13](https://github.com/electron/electron/releases/tag/v3.0.13)
* [2.0.16](https://github.com/electron/electron/releases/tag/v2.0.16)
- [4.0.0-beta.11](https://github.com/electron/electron/releases/tag/v4.0.0-beta.11)
- [3.1.0-beta.4](https://github.com/electron/electron/releases/tag/v3.1.0-beta.4)
- [3.0.13](https://github.com/electron/electron/releases/tag/v3.0.13)
- [2.0.16](https://github.com/electron/electron/releases/tag/v2.0.16)
There are no reports of this in the wild; however, affected applications are urged to mitigate.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: new-website
---
Electron has a new website at [electronjs.org]! We've replaced
our static Jekyll site with a Node.js webserver, giving us flexibility to
internationalize the site and paving the way for more exciting new features.
@ -162,14 +163,14 @@ Thank you!
![Thumbs up!](https://user-images.githubusercontent.com/2289/32871386-92eaa4ea-ca35-11e7-9511-a746c7fbf2c4.png)
[Atom]: https://atom.io
[atom]: https://atom.io
[cask]: https://caskroom.github.io
[crowdin.com/project/electron]: https://crowdin.com/project/electron
[Crowdin]: https://crowdin.com/project/electron
[crowdin]: https://crowdin.com/project/electron
[electron/electron-apps]: https://github.com/electron/electron-apps
[electron/electron-i18n]: https://github.com/electron/electron-i18n#readme
[electronjs.org]: https://electronjs.org
[GitHub Desktop]: https://desktop.github.com
[Homebrew]: https://brew.sh
[Jekyll]: https://jekyllrb.com
[Node.js]: https://nodejs.org
[github desktop]: https://desktop.github.com
[homebrew]: https://brew.sh
[jekyll]: https://jekyllrb.com
[node.js]: https://nodejs.org

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/BinaryMuse.png?size=96'
slug: nodejs-native-addons-and-electron-5
---
If you're having trouble using a native Node.js addon with Electron 5.0, there's a chance it needs to be updated to work with the most recent version of V8.
---
@ -15,7 +16,7 @@ If you're having trouble using a native Node.js addon with Electron 5.0, there's
In 2014, the V8 team deprecated `v8::Handle` in favor of `v8::Local` for local handles. Electron 5.0 includes a version of V8 that has finally removed `v8::Handle` for good, and native Node.js addons that still use it will need to be updated before they can be used with Electron 5.0.
The required code change is minimal, but *every* native Node module that still uses `v8::Handle` will fail to build with Electron 5.0 and will need to be modified. The good news is that Node.js v12 will also include this V8 change, so any modules that use `v8::Handle` will need to be updated *anyway* to work with the upcoming version of Node.
The required code change is minimal, but _every_ native Node module that still uses `v8::Handle` will fail to build with Electron 5.0 and will need to be modified. The good news is that Node.js v12 will also include this V8 change, so any modules that use `v8::Handle` will need to be updated _anyway_ to work with the upcoming version of Node.
## I maintain a native addon, how can I help?

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: npm-install-electron
---
As of Electron version 1.3.1, you can `npm install electron --save-dev` to
install the latest precompiled version of Electron in your app.
@ -44,7 +45,7 @@ As of version 1.3.1, we have begun publishing
packages to npm in tandem. The two packages are identical. We chose to continue publishing
the package under both names for a while so as not to inconvenience the
thousands of developers who are currently using `electron-prebuilt` in their projects.
We recommend updating your `package.json` files to use the new `electron` dependency,
We recommend updating your `package.json` files to use the new `electron` dependency,
but we will continue releasing new versions of `electron-prebuilt` until the
end of 2016.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: protocol-handler-fix
---
A remote code execution vulnerability has been discovered affecting
Electron apps that use custom protocol handlers. This vulnerability has been
assigned the CVE identifier [CVE-2018-1000006].
@ -43,8 +44,8 @@ after which only positional parameters are accepted.
```js
app.setAsDefaultProtocolClient(protocol, process.execPath, [
'--your-switches-here',
'--'
])
'--',
]);
```
See the [app.setAsDefaultProtocolClient] API for more details.
@ -56,5 +57,5 @@ If you wish to report a vulnerability in Electron, email
security@electronjs.org.
[security tutorial]: https://electronjs.org/docs/tutorial/security
[app.setAsDefaultProtocolClient]: https://electronjs.org/docs/api/app#appsetasdefaultprotocolclientprotocol-path-args-macos-windows
[CVE-2018-1000006]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000006
[app.setasdefaultprotocolclient]: https://electronjs.org/docs/api/app#appsetasdefaultprotocolclientprotocol-path-args-macos-windows
[cve-2018-1000006]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000006

Просмотреть файл

@ -1,5 +1,5 @@
---
title: "S3 Bucket Migration"
title: 'S3 Bucket Migration'
date: 2022-05-06T00:00:00.000Z
authors:
name: MarshallOfSound
@ -13,15 +13,15 @@ Electron is changing its primary S3 bucket, you may need to update your build sc
# What is happening?
A significant amount of Electron's build artifacts are uploaded to an S3 bucket called `gh-contractor-zcbenz`. As part of ongoing infrastructure/ownership migrations that started way back in 2020, we will be changing everything that used `gh-contractor-zcbenz` from its old home in S3 to a new storage system hosted at `https://artifacts.electronjs.org`. The path prefix that most of our assets use is changing slightly as well. Examples are included below:
A significant amount of Electron's build artifacts are uploaded to an S3 bucket called `gh-contractor-zcbenz`. As part of ongoing infrastructure/ownership migrations that started way back in 2020, we will be changing everything that used `gh-contractor-zcbenz` from its old home in S3 to a new storage system hosted at `https://artifacts.electronjs.org`. The path prefix that most of our assets use is changing slightly as well. Examples are included below:
**Before:** https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v17.0.0/node.lib
**After:** https://artifacts.electronjs.org/headers/dist/v17.0.0/node.lib
**After:** https://artifacts.electronjs.org/headers/dist/v17.0.0/node.lib
The important things here are the **Hostname** changed and the `/atom-shell` **prefix** changed. Another example, this time for debug symbols:
The important things here are the **Hostname** changed and the `/atom-shell` **prefix** changed. Another example, this time for debug symbols:
**Before:** https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/symbols/path/to/symbol.pdb
**After:** https://artifacts.electronjs.org/symbols/path/to/symbol.pdb
**After:** https://artifacts.electronjs.org/symbols/path/to/symbol.pdb
Again, the hostname changed and the `/atom-shell` prefix was changed.
@ -33,6 +33,6 @@ For anyone directly referencing the S3 bucket, you must update your reference to
# What about existing data?
Most data that existed on the `gh-contractor-zcbenz` bucket has been cloned into the new storage system. This means all debug symbols and all headers have been copied. If you relied on some data in that bucket that hasn't been copied over please raise an issue in [`electron/electron`](https://github.com/electron/electron) and let us know.
Most data that existed on the `gh-contractor-zcbenz` bucket has been cloned into the new storage system. This means all debug symbols and all headers have been copied. If you relied on some data in that bucket that hasn't been copied over please raise an issue in [`electron/electron`](https://github.com/electron/electron) and let us know.
The current `gh-contractor-zcbenz` S3 bucket will not be actively deleted. However, we can't guarantee how long that bucket will be left alive. We **strongly** recommend updating to target the new bucket as soon as possible.
The current `gh-contractor-zcbenz` S3 bucket will not be actively deleted. However, we can't guarantee how long that bucket will be left alive. We **strongly** recommend updating to target the new bucket as soon as possible.

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: search
---
The Electron website has a new search engine that delivers instant results for
API docs, tutorials, Electron-related npm packages, and more.
@ -54,8 +55,8 @@ Here are some of the features that made Algolia a good fit for the Electron proj
## API Docs
Sometimes you know *what* you want to accomplish, but you don't know exactly
*how* to do it. Electron has over 750 API methods, events, and properties.
Sometimes you know _what_ you want to accomplish, but you don't know exactly
_how_ to do it. Electron has over 750 API methods, events, and properties.
No human can easily remember all of them, but computers are good at this stuff.
Using Electron's [JSON API docs](https://electronjs.org/blog/api-docs-json-schema),
we indexed all of this data in Algolia, and now you can easily find
@ -152,7 +153,7 @@ for building these new search capabilities, to [Libraries.io] for providing
[`security`]: https://electronjs.org/?query=security
[`sourceranks`]: https://github.com/nice-registry/sourceranks
[`widnow`]: https://electronjs.org/?query=widnow
[Algolia]: https://algolia.com
[Libraries.io]: https://libraries.io
[algolia]: https://algolia.com
[libraries.io]: https://libraries.io
[quick-start]: https://github.com/electron/electron-quick-start
[SourceRank]: https://docs.libraries.io/overview.html#sourcerank
[sourcerank]: https://docs.libraries.io/overview.html#sourcerank

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/haacked.png?size=96'
slug: september-2016-roundup
---
Here are the new Electron apps and talks that were added to the site in September.
---
@ -19,33 +20,33 @@ If you've made an Electron app or host a meetup, make a [pull request](https://g
In September, GitHub held its GitHub Universe conference billed as the event for people building the future of software. There were a couple of interesting Electron talks at the event.
* [Making Electron Development Simpler, More Pleasant, and More Productive](https://www.youtube.com/watch?v=Eqg_IqVeI5s) by Machisté Quintana, a Software Engineer at Slack.
* [Electron: Desktop Apps with Web Languages](https://www.youtube.com/watch?v=FNHBfN8c32U) by Zeke Sikelianos, an Electron Developer at GitHub.
- [Making Electron Development Simpler, More Pleasant, and More Productive](https://www.youtube.com/watch?v=Eqg_IqVeI5s) by Machisté Quintana, a Software Engineer at Slack.
- [Electron: Desktop Apps with Web Languages](https://www.youtube.com/watch?v=FNHBfN8c32U) by Zeke Sikelianos, an Electron Developer at GitHub.
Also, if you happen to be in Paris on December 5, Zeke will be [giving an Electron talk at dotJS 2016](https://twitter.com/dotJS/status/783615732307333120).
### New Apps
| | | |
|---|---|---|
| <img src='/images/apps/pexels-icon.png' width='50'/> | [Pexels](https://www.pexels.com/pro/mac-and-windows-app/) | Search for completely free photos and copy them into your clipboard |
| <img src='/images/apps/timestamp-icon.png' width='50'/> | [Timestamp](https://mzdr.github.io/timestamp/) | A better macOS menu bar clock with a customizable date/time display and a calendar |
| <img src='/images/apps/harmony-icon.png' width='50'/> | [Harmony](http://getharmony.xyz/) | Music player compatible with Spotify, Soundcloud, Play Music and your local files |
| <img src='/images/apps/uphone-icon.png' width='50'/> | [uPhone](http://www.integraccs.com) | WebRTC Desktop Phone |
| <img src='/images/apps/sealtalk-icon.png' width='50'/> | [SealTalk](http://sealtalk.im) | Instant-messaging App powered by RongCloud IM Cloud Service and IM SDK |
| <img src='/images/apps/infinity-icon.png' width='50'/> | [Infinity](https://ycosxapp.github.io) | An easy way to make presentation |
| <img src='/images/apps/cycligent-git-tool-icon.png' width='50'/> | [Cycligent Git Tool](https://www.cycligent.com/git-tool) | Straightforward, graphic GUI for your Git projects |
| <img src='/images/apps/foco-icon.png' width='50'/> | [Foco](https://github.com/akashnimare/foco) | Stay focused and boost productivity with Foco |
| <img src='/images/apps/strawberry-icon.png' width='50'/> | [Strawberry](https://strawberrypos.com) | Win Diners for Life Know and serve them better with the all-in-one restaurant software suite. |
| <img src='/images/apps/mixmax-icon.png' width='50'/> | [Mixmax](https://mixmax.com/download) | See every action on your emails in real-time Compose anywhere. |
| <img src='/images/apps/firebase-admin-icon.png' width='50'/> | [Firebase Admin](https://firebaseadmin.com) | A Firebase data management tool |
| <img src='/images/apps/anote-icon.png' width='50'/> | [ANote](https://github.com/AnotherNote/anote) | A Simple Friendly Markdown Note |
| <img src='/images/apps/temps-icon.png' width='50'/> | [Temps](https://jackd248.github.io/temps/) | A simple but smart menubar weather app |
| <img src='/images/apps/amium-icon.png' width='50'/> | [Amium](https://www.amium.com) | A work collaboration product that brings conversation to your files |
| <img src='/images/apps/soube-icon.png' width='50'/> | [Soube](http://soube.diegomolina.cl) | Simple music player |
| <img src='/images/apps/un-colored-icon.png' width='50'/> | [(Un)colored](https://n457.github.io/Uncolored/) | Next generation desktop rich content editor that saves documents with themes HTML & Markdown compatible. For Windows, OS X & Linux. |
| <img src='/images/apps/quickcalc-icon.png' width='50'/> | [quickcalc](https://github.com/Cwoodall6/quickcalc) | Menubar Calculator |
| <img src='/images/apps/forestpin-analytics-icon.png' width='50'/> | [Forestpin Analytics](http://forestpin.com/analytics) | Financial data analytics tool for businesses |
| <img src='/images/apps/ling-icon.png' width='50'/> | [Ling](https://github.com/talhasch/ling) | REST Client |
| <img src='/images/apps/shortexts-icon.png' width='50'/> | [Shortexts](http://shortexts.com/) | Shortcuts for texts you copy frequently, folders and emojis |
| <img src='/images/apps/front-end-box-icon.png' width='50'/> | [Front-End Box](http://frontendbox.io) | Set of front-end-code generators |
| | | |
| ----------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| <img src='/images/apps/pexels-icon.png' width='50'/> | [Pexels](https://www.pexels.com/pro/mac-and-windows-app/) | Search for completely free photos and copy them into your clipboard |
| <img src='/images/apps/timestamp-icon.png' width='50'/> | [Timestamp](https://mzdr.github.io/timestamp/) | A better macOS menu bar clock with a customizable date/time display and a calendar |
| <img src='/images/apps/harmony-icon.png' width='50'/> | [Harmony](http://getharmony.xyz/) | Music player compatible with Spotify, Soundcloud, Play Music and your local files |
| <img src='/images/apps/uphone-icon.png' width='50'/> | [uPhone](http://www.integraccs.com) | WebRTC Desktop Phone |
| <img src='/images/apps/sealtalk-icon.png' width='50'/> | [SealTalk](http://sealtalk.im) | Instant-messaging App powered by RongCloud IM Cloud Service and IM SDK |
| <img src='/images/apps/infinity-icon.png' width='50'/> | [Infinity](https://ycosxapp.github.io) | An easy way to make presentation |
| <img src='/images/apps/cycligent-git-tool-icon.png' width='50'/> | [Cycligent Git Tool](https://www.cycligent.com/git-tool) | Straightforward, graphic GUI for your Git projects |
| <img src='/images/apps/foco-icon.png' width='50'/> | [Foco](https://github.com/akashnimare/foco) | Stay focused and boost productivity with Foco |
| <img src='/images/apps/strawberry-icon.png' width='50'/> | [Strawberry](https://strawberrypos.com) | Win Diners for Life Know and serve them better with the all-in-one restaurant software suite. |
| <img src='/images/apps/mixmax-icon.png' width='50'/> | [Mixmax](https://mixmax.com/download) | See every action on your emails in real-time Compose anywhere. |
| <img src='/images/apps/firebase-admin-icon.png' width='50'/> | [Firebase Admin](https://firebaseadmin.com) | A Firebase data management tool |
| <img src='/images/apps/anote-icon.png' width='50'/> | [ANote](https://github.com/AnotherNote/anote) | A Simple Friendly Markdown Note |
| <img src='/images/apps/temps-icon.png' width='50'/> | [Temps](https://jackd248.github.io/temps/) | A simple but smart menubar weather app |
| <img src='/images/apps/amium-icon.png' width='50'/> | [Amium](https://www.amium.com) | A work collaboration product that brings conversation to your files |
| <img src='/images/apps/soube-icon.png' width='50'/> | [Soube](http://soube.diegomolina.cl) | Simple music player |
| <img src='/images/apps/un-colored-icon.png' width='50'/> | [(Un)colored](https://n457.github.io/Uncolored/) | Next generation desktop rich content editor that saves documents with themes HTML & Markdown compatible. For Windows, OS X & Linux. |
| <img src='/images/apps/quickcalc-icon.png' width='50'/> | [quickcalc](https://github.com/Cwoodall6/quickcalc) | Menubar Calculator |
| <img src='/images/apps/forestpin-analytics-icon.png' width='50'/> | [Forestpin Analytics](http://forestpin.com/analytics) | Financial data analytics tool for businesses |
| <img src='/images/apps/ling-icon.png' width='50'/> | [Ling](https://github.com/talhasch/ling) | REST Client |
| <img src='/images/apps/shortexts-icon.png' width='50'/> | [Shortexts](http://shortexts.com/) | Shortcuts for texts you copy frequently, folders and emojis |
| <img src='/images/apps/front-end-box-icon.png' width='50'/> | [Front-End Box](http://frontendbox.io) | Set of front-end-code generators |

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: simple-samples
---
We recently hosted an Electron hackathon at GitHub HQ for members of [Hackbright Academy](https://hackbrightacademy.com), a coding school for women founded in San Francisco. To help attendees get a head start on their projects, our own [Kevin Sawicki](https://github.com/kevinsawicki) created a few sample Electron applications.
---

Просмотреть файл

@ -2,11 +2,10 @@
title: Spectron Deprecation Notice
date: 2021-12-01T00:00:00.000Z
authors:
- name: vertedinde
url: 'https://github.com/vertedinde'
image_url: 'https://github.com/vertedinde.png?size=96'
- name: vertedinde
url: 'https://github.com/vertedinde'
image_url: 'https://github.com/vertedinde.png?size=96'
slug: spectron-deprecation-notice
---
Spectron will be deprecated on February 1st, 2022.

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/kevinsawicki.png?size=96'
slug: touch-bar-support
---
The Electron [1.6.3] beta release contains initial support for the macOS [Touch Bar].
---
@ -36,19 +37,19 @@ It demonstrates how to create a touch bar, style the items, associate it with a
window, handle button click events, and update the labels dynamically.
```js
const {app, BrowserWindow, TouchBar} = require('electron')
const { app, BrowserWindow, TouchBar } = require('electron');
const {TouchBarButton, TouchBarLabel, TouchBarSpacer} = TouchBar
const { TouchBarButton, TouchBarLabel, TouchBarSpacer } = TouchBar;
let spinning = false
let spinning = false;
// Reel labels
const reel1 = new TouchBarLabel()
const reel2 = new TouchBarLabel()
const reel3 = new TouchBarLabel()
const reel1 = new TouchBarLabel();
const reel2 = new TouchBarLabel();
const reel3 = new TouchBarLabel();
// Spin result label
const result = new TouchBarLabel()
const result = new TouchBarLabel();
// Spin button
const spin = new TouchBarButton({
@ -57,74 +58,74 @@ const spin = new TouchBarButton({
click: () => {
// Ignore clicks if already spinning
if (spinning) {
return
return;
}
spinning = true
result.label = ''
spinning = true;
result.label = '';
let timeout = 10
const spinLength = 4 * 1000 // 4 seconds
const startTime = Date.now()
let timeout = 10;
const spinLength = 4 * 1000; // 4 seconds
const startTime = Date.now();
const spinReels = () => {
updateReels()
updateReels();
if ((Date.now() - startTime) >= spinLength) {
finishSpin()
if (Date.now() - startTime >= spinLength) {
finishSpin();
} else {
// Slow down a bit on each spin
timeout *= 1.1
setTimeout(spinReels, timeout)
timeout *= 1.1;
setTimeout(spinReels, timeout);
}
}
};
spinReels()
}
})
spinReels();
},
});
const getRandomValue = () => {
const values = ['🍒', '💎', '7⃣', '🍊', '🔔', '⭐', '🍇', '🍀']
return values[Math.floor(Math.random() * values.length)]
}
const values = ['🍒', '💎', '7⃣', '🍊', '🔔', '⭐', '🍇', '🍀'];
return values[Math.floor(Math.random() * values.length)];
};
const updateReels = () => {
reel1.label = getRandomValue()
reel2.label = getRandomValue()
reel3.label = getRandomValue()
}
reel1.label = getRandomValue();
reel2.label = getRandomValue();
reel3.label = getRandomValue();
};
const finishSpin = () => {
const uniqueValues = new Set([reel1.label, reel2.label, reel3.label]).size
const uniqueValues = new Set([reel1.label, reel2.label, reel3.label]).size;
if (uniqueValues === 1) {
// All 3 values are the same
result.label = '💰 Jackpot!'
result.textColor = '#FDFF00'
result.label = '💰 Jackpot!';
result.textColor = '#FDFF00';
} else if (uniqueValues === 2) {
// 2 values are the same
result.label = '😍 Winner!'
result.textColor = '#FDFF00'
result.label = '😍 Winner!';
result.textColor = '#FDFF00';
} else {
// No values are the same
result.label = '🙁 Spin Again'
result.textColor = null
result.label = '🙁 Spin Again';
result.textColor = null;
}
spinning = false
}
spinning = false;
};
const touchBar = new TouchBar([
spin,
new TouchBarSpacer({size: 'large'}),
new TouchBarSpacer({ size: 'large' }),
reel1,
new TouchBarSpacer({size: 'small'}),
new TouchBarSpacer({ size: 'small' }),
reel2,
new TouchBarSpacer({size: 'small'}),
new TouchBarSpacer({ size: 'small' }),
reel3,
new TouchBarSpacer({size: 'large'}),
result
])
new TouchBarSpacer({ size: 'large' }),
result,
]);
let window
let window;
app.once('ready', () => {
window = new BrowserWindow({
@ -132,12 +133,12 @@ app.once('ready', () => {
titleBarStyle: 'hidden-inset',
width: 200,
height: 200,
backgroundColor: '#000'
})
window.loadURL('about:blank')
window.setTouchBar(touchBar)
})
backgroundColor: '#000',
});
window.loadURL('about:blank');
window.setTouchBar(touchBar);
});
```
[1.6.3]: https://github.com/electron/electron/releases/tag/v1.6.3
[Touch Bar]: https://developer.apple.com/macos/touch-bar
[touch bar]: https://developer.apple.com/macos/touch-bar

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: typescript
---
The `electron` npm package now includes a TypeScript definition file that provides detailed annotations of the entire Electron API. These annotations can improve your Electron development
experience **even if you're writing vanilla JavaScript**. Just
`npm install electron` to get up-to-date Electron typings in your project.
@ -18,7 +19,7 @@ a superset of JavaScript that extends the language by adding support for
static types. The TypeScript community has grown quickly in recent years,
and TypeScript was ranked among the
[most loved programming languages](https://stackoverflow.com/insights/survey/2017#technology-most-loved-dreaded-and-wanted-languages)
in a recent Stack Overflow developer survey. TypeScript is described
in a recent Stack Overflow developer survey. TypeScript is described
as "JavaScript that scales", and teams at
[GitHub](https://githubengineering.com/how-four-native-developers-wrote-an-electron-app/),
[Slack](https://slack.engineering/typescript-at-slack-a81307fa288d),

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: userland
---
We've added a new [userland](https://electronjs.org/userland) section to
the Electron website to help users discover the people, packages, and apps that make
up our flourishing open-source ecosystem.

Просмотреть файл

@ -39,14 +39,17 @@ Lastly, there are workarounds for apps that really need a larger heap size. For
## FAQ
### How will I know if my app is impacted by this change?
Attempting to wrap external memory with an ArrayBuffer will crash at runtime in Electron 20+.
If you don't use any native Node modules in your app, you're safe—there's no way to trigger this crash from pure JS. This change only affects native Node modules which allocate memory outside of the V8 heap (e.g. using `malloc` or `new`) and then wrap the external memory with an ArrayBuffer. This is a fairly rare use case, but some modules do use this technique, and such modules will need to be refactored in order to be compatible with Electron 20+.
### How can I measure how much V8 heap memory my app is using to know if I'm close to the 4GB limit?
In the renderer process, you can use [`performance.memory.usedJSHeapSize`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory), which will return the V8 heap usage in bytes. In the main process, you can use [`process.memoryUsage().heapUsed`](https://nodejs.org/api/process.html#processmemoryusage), which is comparable.
### What is the V8 memory cage?
Some documents refer to it as the "V8 sandbox", but that term is easily confusable with [other kinds of sandboxing](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md) that happen in Chromium, so I'll stick to the term "memory cage".
There's a fairly common kind of V8 exploit that goes something like this:
@ -59,6 +62,7 @@ The V8 memory cage is a technique designed to categorically prevent this kind of
There's a lot more available to read on how the V8 memory cage works, so I won't go into further detail here—the best place to start reading is probably the [high-level design doc](https://docs.google.com/document/d/1FM4fQmIhEqPG8uGp5o9A-mnPB5BOeScZYpkHjo0KKA8/edit) from the Chromium team.
### I want to refactor a Node native module to support Electron 21+. How do I do that?
There are two ways to go about refactoring a native module to be compatible with the V8 memory cage. The first is to **copy** externally-created buffers into the V8 memory cage before passing them to JavaScript. This is generally a simple refactor, but it can be slow when the buffers are large. The other approach is to **use V8's memory allocator** to allocate memory which you intend to eventually pass to JavaScript. This is a bit more involved, but will allow you to avoid the copy, meaning better performance for large buffers.
To make this more concrete, here's an example N-API module that uses external array buffers:

Просмотреть файл

@ -13,6 +13,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: voltra
---
This week we met with [Aprile Elcich](https://twitter.com/aprileelcich) and
[Paolo Fragomeni](https://twitter.com/0x00A) to talk about Voltra, an
Electron-powered music player.
@ -71,7 +72,7 @@ We spend a lot of time focused on performance. We started with frameworks but mo
We handle very large collections pretty well at this point. Large collections means possibly tens of thousands of images! Having Node.js file system module directly available from the render process made it really easy to lazy load and unload lots of images super quickly based on DOM events.
In general *[setImmediate]* and *[requestIdleCallback]* have been super important tools for performing lots of processing while keeping the UI responsive. More specifically, distributing CPU-bound tasks into separate processes really helps to keep the user interface responsive. For example, we moved the actual audio context into a separate process, communicating with it over [IPC] to avoid potential interruptions from a busy UI.
In general _[setImmediate]_ and _[requestIdleCallback]_ have been super important tools for performing lots of processing while keeping the UI responsive. More specifically, distributing CPU-bound tasks into separate processes really helps to keep the user interface responsive. For example, we moved the actual audio context into a separate process, communicating with it over [IPC] to avoid potential interruptions from a busy UI.
## Why did you choose to build Voltra on Electron?
@ -87,7 +88,7 @@ Also, and most importantly, with Electron you develop once and it should Just Wo
**Competency**: Its just the web stack, so literally our whole team is involved in actually building the product.
**Community**: There is a highly organized community that knows how to communicate really well! We feel pretty great about developing with support like that.
**Community**: There is a highly organized community that knows how to communicate really well! We feel pretty great about developing with support like that.
## In what areas could Electron be improved?
@ -97,6 +98,6 @@ We would like to see Electron endorse a single packager. The packager is as impo
Were currently developing a mobile app, and working with artists and labels to add their music to the Voltra shop. Hey! If youre an artist or label, [sign up now](https://admin.voltra.co/signup)! We plan on opening up the shop when we reach our goal of 10 million tracks.
[setImmediate]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
[requestIdleCallback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
[IPC]: https://electronjs.org/docs/glossary/#ipc
[setimmediate]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
[requestidlecallback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
[ipc]: https://electronjs.org/docs/glossary/#ipc

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/ckerr.png?size=96'
slug: web-preferences-fix
---
A remote code execution vulnerability has been discovered affecting apps with the ability to open nested child windows on Electron versions (3.0.0-beta.6, 2.0.7, 1.8.7, and 1.7.15). This vulnerability has been assigned the CVE identifier [CVE-2018-15685].
---
@ -22,16 +23,16 @@ _Details_
You are impacted if any user code runs inside an `iframe` / can create an `iframe`. Given the possibility of an XSS vulnerability it can be assumed that most apps are vulnerable to this case.
You are also impacted if you open any of your windows with the `nativeWindowOpen: true` or `sandbox: true` option. Although this vulnerability also requires an XSS vulnerability to exist in your app, you should still apply one of the mitigations below if you use either of these options.
You are also impacted if you open any of your windows with the `nativeWindowOpen: true` or `sandbox: true` option. Although this vulnerability also requires an XSS vulnerability to exist in your app, you should still apply one of the mitigations below if you use either of these options.
## Mitigation
We've published new versions of Electron which include fixes for this vulnerability: [`3.0.0-beta.7`](https://github.com/electron/electron/releases/tag/v3.0.0-beta.7), [`2.0.8`](https://github.com/electron/electron/releases/tag/v2.0.8), [`1.8.8`](https://github.com/electron/electron/releases/tag/v1.8.8), and [`1.7.16`](https://github.com/electron/electron/releases/tag/v1.7.16). We urge all Electron developers to update their apps to the latest stable version immediately.
We've published new versions of Electron which include fixes for this vulnerability: [`3.0.0-beta.7`](https://github.com/electron/electron/releases/tag/v3.0.0-beta.7), [`2.0.8`](https://github.com/electron/electron/releases/tag/v2.0.8), [`1.8.8`](https://github.com/electron/electron/releases/tag/v1.8.8), and [`1.7.16`](https://github.com/electron/electron/releases/tag/v1.7.16). We urge all Electron developers to update their apps to the latest stable version immediately.
If for some reason you are unable to upgrade your Electron version, you can protect your app by blanket-calling `event.preventDefault()` on the `new-window` event for all `webContents`'. If you don't use `window.open` or any child windows at all then this is also a valid mitigation for your app.
If for some reason you are unable to upgrade your Electron version, you can protect your app by blanket-calling `event.preventDefault()` on the `new-window` event for all `webContents`'. If you don't use `window.open` or any child windows at all then this is also a valid mitigation for your app.
```javascript
mainWindow.webContents.on('new-window', e => e.preventDefault())
mainWindow.webContents.on('new-window', (e) => e.preventDefault());
```
If you rely on the ability of your child windows to make grandchild windows, then a third mitigation strategy is to use the following code on your top level window:
@ -39,20 +40,26 @@ If you rely on the ability of your child windows to make grandchild windows, the
```javascript
const enforceInheritance = (topWebContents) => {
const handle = (webContents) => {
webContents.on('new-window', (event, url, frameName, disposition, options) => {
if (!options.webPreferences) {
options.webPreferences = {}
webContents.on(
'new-window',
(event, url, frameName, disposition, options) => {
if (!options.webPreferences) {
options.webPreferences = {};
}
Object.assign(
options.webPreferences,
topWebContents.getLastWebPreferences()
);
if (options.webContents) {
handle(options.webContents);
}
}
Object.assign(options.webPreferences, topWebContents.getLastWebPreferences())
if (options.webContents) {
handle(options.webContents)
}
})
}
handle(topWebContents)
}
);
};
handle(topWebContents);
};
enforceInheritance(mainWindow.webContents)
enforceInheritance(mainWindow.webContents);
```
This code will manually enforce that the top level windows `webPreferences` is manually applied to all child windows infinitely deep.
@ -66,4 +73,4 @@ To learn more about best practices for keeping your Electron apps secure, see ou
If you wish to report a vulnerability in Electron, email security@electronjs.org.
[security tutorial]: https://electronjs.org/docs/tutorial/security
[CVE-2018-15685]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15685
[cve-2018-15685]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15685

Просмотреть файл

@ -7,6 +7,7 @@ authors:
image_url: 'https://github.com/zeke.png?size=96'
slug: website-hiccups
---
Last week the [electronjs.org](https://electronjs.org) site had a few minutes
of downtime. If you were affected by these brief outages, we're sorry
for the inconvenience. After a bit of investigation today, we've diagnosed
@ -14,16 +15,16 @@ the root cause and have deployed a [fix](https://github.com/electron/electronjs.
---
To prevent this kind of downtime in the future, we've enabled
To prevent this kind of downtime in the future, we've enabled
[Heroku threshold alerts](https://devcenter.heroku.com/articles/metrics#threshold-alerting)
on our app. Any time our web server accumulates failed requests or slow responses beyond a certain threshold, our team will be notified so we can
on our app. Any time our web server accumulates failed requests or slow responses beyond a certain threshold, our team will be notified so we can
address the problem quickly.
## Offline Docs in Every Language
The next time you're developing an Electron app on a plane or in a subterranean
coffee shop, you might want to have a copy of the docs for offline reference.
Fortunately, Electron's docs are available as Markdown files in over 20
coffee shop, you might want to have a copy of the docs for offline reference.
Fortunately, Electron's docs are available as Markdown files in over 20
languages.
```sh
@ -35,14 +36,14 @@ ls electron-i18n/content
[devdocs.io/electron](https://devdocs.io/electron/) is a handy website that
stores docs for offline use, not just for Electron but many other projects like
JavaScript, TypeScript, Node.js, React, Angular, and many others. And of course
there's an Electron app for that, too.
Check out [devdocs-app](https://electronjs.org/apps/devdocs-app)
JavaScript, TypeScript, Node.js, React, Angular, and many others. And of course
there's an Electron app for that, too.
Check out [devdocs-app](https://electronjs.org/apps/devdocs-app)
on the Electron site.
[![](https://user-images.githubusercontent.com/8784712/27121730-11676ba8-511b-11e7-8c01-00444ee8501a.png)](https://electronjs.org/apps/devdocs-app)
If you like to install apps without using your mouse or trackpad, give
If you like to install apps without using your mouse or trackpad, give
[Electron Forge](https://electronforge.io/)'s `install` command a try:
```sh

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше