Browse Source

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
Kilian Valkhof 5 years ago
parent
commit
d77159a19e
1 changed files with 10 additions and 3 deletions
  1. 10 3
      docs/tutorial/devtools-extension.md

+ 10 - 3
docs/tutorial/devtools-extension.md

@@ -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