docs: add information about persistence and removal of DevTools Extensions (#18519)

* docs: add information about persistence and removal of DevTools Extensions

* Update devtools-extension.md

* Remove trailing space
This commit is contained in:
Kilian Valkhof 2019-06-15 13:38:55 +02:00 коммит произвёл Cheng Zhao
Родитель 370e9522b4
Коммит d77159a19e
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -41,9 +41,16 @@ Using the [React Developer Tools][react-devtools] as example:
**Note:** The `BrowserWindow.addDevToolsExtension` API cannot be called before the
ready event of the app module is emitted.
The name of the extension is returned by `BrowserWindow.addDevToolsExtension`,
and you can pass the name of the extension to the `BrowserWindow.removeDevToolsExtension`
API to unload it.
The extension will be remembered so you only need to call this API once per
extension. If you try to add an extension that has already been loaded, this method
will not return and instead log a warning to the console.
### How to remove a DevTools Extension
You can pass the name of the extension to the `BrowserWindow.removeDevToolsExtension`
API to remove it. The name of the extension is returned by
`BrowserWindow.addDevToolsExtension` and you can get the names of all installed
DevTools Extensions using the `BrowserWindow.getDevToolsExtensions` API.
## Supported DevTools Extensions