From 5593717d782dfc2cd549d51bf9fdaf48830ef731 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 9 Sep 2015 13:57:35 -0700 Subject: [PATCH] Create Instance Properties section --- docs/api/browser-window.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index ad62cc01..a0f29e34 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -288,11 +288,10 @@ API is not for programming use. Remove the devtools extension whose name is `name`. -## Instance Methods -Objects created with `new BrowserWindow` have the following instance methods: +## Instance Properties -**Note** Some methods are only available on specific operating systems and are labeled as such. +Objects created with `new BrowserWindow` have the following properties: ```javascript var BrowserWindow = require('browser-window'); @@ -302,7 +301,7 @@ var win = new BrowserWindow({ width: 800, height: 600 }); ``` -### `win.webContents()` +### `win.webContents` The `WebContents` object this window owns, all web page related events and operations will be done via it. @@ -313,16 +312,31 @@ events. **Note:** Users should never store this object because it may become `null` when the renderer process (web page) has crashed. -### `win.devToolsWebContents()` +### `win.devToolsWebContents` -Get the `WebContents` of devtools for this window. +The `WebContents` of devtools for this window. **Note:** Users should never store this object because it may become `null` when the devtools has been closed. -### `win.id()` +### `win.id` + +The unique ID of this window. + + +## Instance Methods + +Objects created with `new BrowserWindow` have the following instance methods: + +**Note** Some methods are only available on specific operating systems and are labeled as such. + +```javascript +var BrowserWindow = require('browser-window'); -Get the unique ID of this window. +// In this example `win` is our instance +var win = new BrowserWindow({ width: 800, height: 600 }); + +``` ### `win.destroy()` -- 2.43.0