Document static webContents methods
authorKevin Sawicki <kevinsawicki@gmail.com>
Thu, 14 Jul 2016 16:00:29 +0000 (09:00 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Thu, 14 Jul 2016 16:00:29 +0000 (09:00 -0700)
docs/api/web-contents.md

index 8747b0bc722a2b2755b6618a3e5422d933cccec3..a13750294ca200b0a9c12dee785a5904b2824a1d 100644 (file)
@@ -420,6 +420,20 @@ app.on('ready', () => {
 })
 ```
 
+## Static Methods
+
+The `webContents` class has the following static methods:
+
+#### `webContents.getAllWebContents()`
+
+Returns an array of all web contents. This will contain web contents for all
+windows, webviews, opened devtools, and devtools extension background pages.
+
+#### `webContents.getFocusedWebContents()`
+
+Returns the web contents that is focused in this application, otherwise
+returns `null`.
+
 ## Instance Methods
 
 The `webContents` object has the following instance methods: