docs: move organizational info docs to new directory (#17865)

* docs: move organizational info docs to new directory

* fix some markdown lint issues
This commit is contained in:
Shelley Vohr 2019-04-25 15:14:19 -07:00 committed by GitHub
parent c2c3a04628
commit 2108044bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 128 additions and 89 deletions

View file

@ -1,14 +1,14 @@
# API Contract
Breaking changes will be documented here, and deprecation warnings added to JS code where possible, at least [one major version](../tutorial/electron-versioning.md#semver) before the change is made.
Breaking changes will be documented here, and deprecation warnings added to JS code where possible, at least [one major version](../electron-versioning.md#semver) before the change is made.
# `FIXME` comments
## `FIXME` comments
The `FIXME` string is used in code comments to denote things that should be fixed for future releases. See https://github.com/electron/electron/search?q=fixme
# Planned Breaking API Changes (6.0)
## Planned Breaking API Changes (6.0)
## `win.setMenu(null)`
### `win.setMenu(null)`
```js
// Deprecated
@ -17,7 +17,7 @@ win.setMenu(null)
win.removeMenu()
```
## `contentTracing.getTraceBufferUsage()`
### `contentTracing.getTraceBufferUsage()`
```js
// Deprecated
@ -30,7 +30,7 @@ contentTracing.getTraceBufferUsage().then(infoObject => {
})
```
## `electron.screen` in renderer process
### `electron.screen` in renderer process
```js
// Deprecated
@ -39,7 +39,7 @@ require('electron').screen
require('electron').remote.screen
```
## `require` in sandboxed renderers
### `require` in sandboxed renderers
```js
// Deprecated
@ -63,7 +63,7 @@ require('path')
require('electron').remote.require('path')
```
## `powerMonitor.querySystemIdleState`
### `powerMonitor.querySystemIdleState`
```js
// Deprecated
@ -72,7 +72,7 @@ powerMonitor.querySystemIdleState(threshold, callback)
const idleState = getSystemIdleState(threshold)
```
## `powerMonitor.querySystemIdleTime`
### `powerMonitor.querySystemIdleTime`
```js
// Deprecated
@ -90,13 +90,13 @@ app.enableMixedSandbox()
Mixed-sandbox mode is now enabled by default.
## Preload scripts outside of app path are not allowed
### Preload scripts outside of app path are not allowed
For security reasons, preload scripts can only be loaded from a subpath of the [app path](app.md#appgetapppath).
# Planned Breaking API Changes (5.0)
## Planned Breaking API Changes (5.0)
## `new BrowserWindow({ webPreferences })`
### `new BrowserWindow({ webPreferences })`
The following `webPreferences` option default values are deprecated in favor of the new defaults listed below.
@ -106,16 +106,16 @@ The following `webPreferences` option default values are deprecated in favor of
| `nodeIntegration` | `true` | `false` |
| `webviewTag` | `nodeIntegration` if set else `true` | `false` |
## `nativeWindowOpen`
### `nativeWindowOpen`
Child windows opened with the `nativeWindowOpen` option will always have Node.js integration disabled.
## Privileged Schemes Registration
### Privileged Schemes Registration
Renderer process APIs `webFrame.setRegisterURLSchemeAsPrivileged` and `webFrame.registerURLSchemeAsBypassingCSP` as well as browser process API `protocol.registerStandardSchemes` have been removed.
A new API, `protocol.registerSchemesAsPrivileged` has been added and should be used for registering custom schemes with the required privileges. Custom schemes are required to be registered before app ready.
## webFrame Isolated World APIs
### webFrame Isolated World APIs
```js
// Deprecated
@ -132,11 +132,11 @@ webFrame.setIsolatedWorldInfo(
})
```
# Planned Breaking API Changes (4.0)
## Planned Breaking API Changes (4.0)
The following list includes the breaking API changes made in Electron 4.0.
## `app.makeSingleInstance`
### `app.makeSingleInstance`
```js
// Deprecated
@ -150,7 +150,7 @@ app.on('second-instance', (event, argv, cwd) => {
})
```
## `app.releaseSingleInstance`
### `app.releaseSingleInstance`
```js
// Deprecated
@ -159,7 +159,7 @@ app.releaseSingleInstance()
app.releaseSingleInstanceLock()
```
## `app.getGPUInfo`
### `app.getGPUInfo`
```js
app.getGPUInfo('complete')
@ -167,7 +167,7 @@ app.getGPUInfo('complete')
app.getGPUInfo('basic')
```
## `win_delay_load_hook`
### `win_delay_load_hook`
When building native modules for windows, the `win_delay_load_hook` variable in
the module's `binding.gyp` must be true (which is the default). If this hook is
@ -175,11 +175,11 @@ not present, then the native module will fail to load on Windows, with an error
message like `Cannot find module`. See the [native module
guide](/docs/tutorial/using-native-node-modules.md) for more.
# Breaking API Changes (3.0)
## Breaking API Changes (3.0)
The following list includes the breaking API changes in Electron 3.0.
## `app`
### `app`
```js
// Deprecated
@ -192,7 +192,7 @@ const metrics = app.getAppMetrics()
const { memory } = metrics[0] // Deprecated property
```
## `BrowserWindow`
### `BrowserWindow`
```js
// Deprecated
@ -216,7 +216,7 @@ window.on('app-command', (e, cmd) => {
})
```
## `clipboard`
### `clipboard`
```js
// Deprecated
@ -240,7 +240,7 @@ clipboard.writeHtml()
clipboard.writeHTML()
```
## `crashReporter`
### `crashReporter`
```js
// Deprecated
@ -257,7 +257,7 @@ crashReporter.start({
})
```
## `nativeImage`
### `nativeImage`
```js
// Deprecated
@ -268,14 +268,14 @@ nativeImage.createFromBuffer(buffer, {
})
```
## `process`
### `process`
```js
// Deprecated
const info = process.getProcessMemoryInfo()
```
## `screen`
### `screen`
```js
// Deprecated
@ -284,7 +284,7 @@ screen.getMenuBarHeight()
screen.getPrimaryDisplay().workArea
```
## `session`
### `session`
```js
// Deprecated
@ -297,7 +297,7 @@ ses.setCertificateVerifyProc((request, callback) => {
})
```
## `Tray`
### `Tray`
```js
// Deprecated
@ -311,7 +311,7 @@ tray.setHighlightMode(false)
tray.setHighlightMode('off')
```
## `webContents`
### `webContents`
```js
// Deprecated
@ -324,7 +324,7 @@ webContents.setSize(options)
// There is no replacement for this API
```
## `webFrame`
### `webFrame`
```js
// Deprecated
@ -338,7 +338,7 @@ webFrame.registerURLSchemeAsPrivileged('app', { secure: true })
protocol.registerStandardSchemes(['app'], { secure: true })
```
## `<webview>`
### `<webview>`
```js
// Removed
@ -354,7 +354,7 @@ webview.onkeydown = () => { /* handler */ }
webview.onkeyup = () => { /* handler */ }
```
## Node Headers URL
### Node Headers URL
This is the URL specified as `disturl` in a `.npmrc` file or as the `--dist-url`
command line flag when building native Node modules.
@ -363,12 +363,11 @@ Deprecated: https://atom.io/download/atom-shell
Replace with: https://atom.io/download/electron
# Breaking API Changes (2.0)
## Breaking API Changes (2.0)
The following list includes the breaking API changes made in Electron 2.0.
## `BrowserWindow`
### `BrowserWindow`
```js
// Deprecated
@ -379,7 +378,7 @@ let optionsB = { titleBarStyle: 'hiddenInset' }
let windowB = new BrowserWindow(optionsB)
```
## `menu`
### `menu`
```js
// Removed
@ -388,7 +387,7 @@ menu.popup(browserWindow, 100, 200, 2)
menu.popup(browserWindow, { x: 100, y: 200, positioningItem: 2 })
```
## `nativeImage`
### `nativeImage`
```js
// Removed
@ -402,13 +401,13 @@ nativeImage.toJpeg()
nativeImage.toJPEG()
```
## `process`
### `process`
* `process.versions.electron` and `process.version.chrome` will be made
read-only properties for consistency with the other `process.versions`
properties set by Node.
## `webContents`
### `webContents`
```js
// Removed
@ -417,7 +416,7 @@ webContents.setZoomLevelLimits(1, 2)
webContents.setVisualZoomLevelLimits(1, 2)
```
## `webFrame`
### `webFrame`
```js
// Removed
@ -426,7 +425,7 @@ webFrame.setZoomLevelLimits(1, 2)
webFrame.setVisualZoomLevelLimits(1, 2)
```
## `<webview>`
### `<webview>`
```js
// Removed
@ -435,7 +434,7 @@ webview.setZoomLevelLimits(1, 2)
webview.setVisualZoomLevelLimits(1, 2)
```
## Duplicate ARM Assets
### Duplicate ARM Assets
Each Electron release includes two identical ARM builds with slightly different
filenames, like `electron-v1.7.3-linux-arm.zip` and