electron/lib/browser/api
Birunthan Mohanathas 7d2226e05e Let Chromium manage document.visibilityState and document.hidden
Chromium already includes the necessary plumbing to manage the
visibility properties and `visibilitychange` event so this gets rid of
most of our custom logic for `BrowserWindow` and `BrowserView`.

Note that `webview` remains unchanged and is still affected by the issues
listed below.

User facing changes:

- The `document` visibility properties and `visibilitychange` event are
  now also updated/fired in response to occlusion changes on macOS. In
  other words, `document.visibilityState` will now be `hidden` on macOS
  if the window is occluded by another window.

- Previously, `visibilitychange` was also fired by *both* Electron and
  Chromium in some cases (e.g. when hiding the window). Now it is only
  fired by Chromium so you no longer get duplicate events.

- The visiblity state of `BrowserWindow`s created with `{ show: false }`
  is now initially `visible` until the window is shown and hidden.

- The visibility state of `BrowserWindow`s with `backgroundThrottling`
  disabled is now permanently `visible`.

This should also fix #6860 (but not for `webview`).
2017-06-06 15:16:01 -07: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 Pass app path as command line argument 2017-04-04 09:36:01 +09:00
auto-updater.js 🎨 2016-05-06 10:12:55 -07:00
browser-view.js Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
browser-window.js Let Chromium manage document.visibilityState and document.hidden 2017-06-06 15:16:01 -07:00
content-tracing.js first pass at standardizing; suite still passing! 2016-03-30 17:00:30 -07:00
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 macOS implementation of notifications in the main process 2017-05-23 02:05:13 +10:00
navigation-controller.js Remove page url check in history.pushState 2017-05-23 22:42:33 +02:00
net.js Check name directly instead of arguments length 2017-03-30 14:03:00 -07:00
notification.js Fix linting errors and add isSupported 2017-05-30 20:27:24 +10: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 Add docs and add isSelected arg 2017-05-03 20:25:50 +10:00
tray.js Remove the JavaScript wrapper for setContextMenu 2016-05-20 16:18:38 +09:00
web-contents.js remove page-title-updated workaround for #3380 2017-05-01 16:53:55 +09:00