8b9f7e5b00
Right now, `<webview>` is the only way to embed additional content in a `BrowserWindow`. Unfortunately `<webview>` suffers from a [number of problems](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Awebview%20). To make matters worse, many of these are upstream Chromium bugs instead of Electron-specific bugs. For us at [Figma](https://www.figma.com), the main issue is very slow performance. Despite the upstream improvements to `<webview>` through the OOPIF work, it is probable that there will continue to be `<webview>`-specific bugs in the future. Therefore, this introduces a `<webview>` alternative to called `BrowserView`, which... - is a thin wrapper around `api::WebContents` (so bugs in `BrowserView` will likely also be bugs in `BrowserWindow` web contents) - is instantiated in the main process like `BrowserWindow` (and unlike `<webview>`, which lives in the DOM of a `BrowserWindow` web contents) - needs to be added to a `BrowserWindow` to display something on the screen This implements the most basic API. The API is expected to evolve and change in the near future and has consequently been marked as experimental. Please do not use this API in production unless you are prepared to deal with breaking changes. In the future, we will want to change the API to support multiple `BrowserView`s per window. We will also want to consider z-ordering auto-resizing, and possibly even nested views. |
||
---|---|---|
atom | ||
chromium_src | ||
default_app | ||
docs | ||
docs-translations | ||
lib | ||
script | ||
spec | ||
tools | ||
vendor | ||
.clang-format | ||
.gitignore | ||
.gitmodules | ||
.node-version | ||
.travis.yml | ||
appveyor.yml | ||
CODE_OF_CONDUCT.md | ||
common.gypi | ||
CONTRIBUTING.md | ||
electron.gyp | ||
filenames.gypi | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
package.json | ||
README.md | ||
SECURITY.md | ||
toolchain.gypi |
📝 Available Translations: Korean | Simplified Chinese | Brazilian Portuguese | Traditional Chinese | Spanish | Turkish
The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used by the Atom editor and many other apps.
Follow @ElectronJS on Twitter for important announcements.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to electron@github.com.
Downloads
To install prebuilt Electron binaries, use
npm
:
# Install as a development dependency
npm install electron --save-dev
# Install the `electron` command globally in your $PATH
npm install electron -g
See the releases page for prebuilt binaries, debug symbols, and more.
Mirrors
Documentation
Guides and the API reference are located in the docs directory. It also contains documents describing how to build and contribute to Electron.
Documentation Translations
- Brazilian Portuguese
- Korean
- Japanese
- Spanish
- Simplified Chinese
- Traditional Chinese
- Turkish
- Thai
- Ukrainian
- Russian
- French
Quick Start
Clone and run the electron/electron-quick-start
repository to see a minimal Electron app in action.
Community
You can ask questions and interact with the community in the following locations:
electron
category on the Atom forums#atom-shell
channel on FreenodeAtom
channel on Slackelectron-br
(Brazilian Portuguese)electron-kr
(Korean)electron-jp
(Japanese)electron-tr
(Turkish)electron-id
(Indonesia)
Check out awesome-electron for a community maintained list of useful example apps, tools and resources.
License
When using the Electron or other GitHub logos, be sure to follow the GitHub logo guidelines.