Browse Source

docs: added webContents.getType() method (backport: 4-0-x) (#16786)

* docs: added webContents.getType() method

* docs: add enumeration of return value for webContents.getType()

* docs: getType() in WebContents should be class method not module method
trop[bot] 6 years ago
parent
commit
c647bf5d27
1 changed files with 4 additions and 0 deletions
  1. 4 0
      docs/api/web-contents.md

+ 4 - 0
docs/api/web-contents.md

@@ -1582,6 +1582,10 @@ Takes a V8 heap snapshot and saves it to `filePath`.
 Controls whether or not this WebContents will throttle animations and timers
 when the page becomes backgrounded. This also affects the Page Visibility API.
 
+#### `contents.getType()`
+
+Returns `String` - the type of the webContent. Can be `backgroundPage`, `window`, `browserView`, `remote`, `webview` or `offscreen`.
+
 ### Instance Properties
 
 #### `contents.id`