electron/docs
Birunthan Mohanathas 8b9f7e5b00 Implement initial, experimental BrowserView API
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.
2017-04-13 01:27:27 +03:00
..
api Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
development builds -> Support 2017-03-30 14:36:52 -07:00
tutorial #9128: Removed unused dll from distribution. 2017-04-10 16:41:16 +02:00
faq.md standardize all javascript blocks in English docs 2016-07-26 09:48:19 -07:00
glossary.md 📝 Fix a broken asar link. 2016-12-26 10:28:08 +01:00
README.md Fix link to the Upgrading Chrome doc 2017-04-06 16:04:19 +10:00
styleguide.md Put optional label before dash 2016-12-29 14:11:26 -08:00

Please make sure that you use the documents that match your Electron version. The version number should be a part of the page URL. If it's not, you are probably using the documentation of a development branch which may contain API changes that are not compatible with your Electron version. To view older versions of the documentation, you can browse by tag on GitHub by opening the "Switch branches/tags" dropdown and selecting the tag that matches your version.

FAQ

There are questions that are asked quite often. Check this out before creating an issue:

Guides

Tutorials

API References

Custom DOM Elements:

Modules for the Main Process:

Modules for the Renderer Process (Web Page):

Modules for Both Processes:

Development