electron/docs
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
..
api Let Chromium manage document.visibilityState and document.hidden 2017-06-06 15:16:01 -07:00
development Clang-Format extension for Visual Studio Code 2017-05-12 18:40:46 +02:00
tutorial 📝 Fixed typo 2017-06-06 23:30:45 +02:00
faq.md Update faq.md 2017-04-22 23:11:04 -04:00
glossary.md Update docs for new brightray location 2017-05-10 13:42:21 -07:00
README.md Add BrowserView to docs index 2017-05-22 17:12:17 +03: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