electron/lib/browser/api
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
..
auto-updater Use const instead of var 2016-08-08 13:07:01 -07:00
exports Refactor electron exports to keep module list in separate files 2017-03-09 19:08:01 -03:00
app.js Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
auto-updater.js
browser-view.js Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
browser-window.js Add static helper to bind touch bar to window 2017-03-03 14:00:39 -08:00
content-tracing.js
dialog.js Make browser window optional 2017-04-04 10:49:10 -07:00
global-shortcut.js 💄 Destructure globalShortcut module 2016-05-14 21:53:42 -04:00
ipc-main.js Use spread syntax instead of apply 2016-12-01 14:56:00 -08:00
menu-item-roles.js 🎨 2017-03-29 12:29:36 -07:00
menu-item.js added default menu items for 'Edit' and 'Window' #2814 2017-03-09 16:01:33 +01:00
menu.js Default async to false when object is specified 2017-03-20 20:37:52 -07:00
module-list.js Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
navigation-controller.js Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
net.js Check name directly instead of arguments length 2017-03-30 14:03:00 -07:00
power-monitor.js Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
power-save-blocker.js 💄 Make the power-save-blocker a bit more concise 2016-05-15 09:36:13 -04:00
protocol.js Fix lint errors of using __proto__ 2016-08-02 21:02:28 +09:00
screen.js Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
session.js Use object for verification request 2017-02-08 11:59:43 -08:00
system-preferences.js Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
touch-bar.js Update as per feedback 2017-04-04 13:51:38 -07:00
tray.js Remove the JavaScript wrapper for setContextMenu 2016-05-20 16:18:38 +09:00
web-contents.js Default hasUserGesture to false when null 2017-03-06 10:51:17 -08:00