From 34fa0f1ff883972c4a980c777c5bde7653e04fa3 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 22 May 2014 09:56:04 +0800 Subject: [PATCH] :memo: Add docs on BrowserWindow.id. --- docs/api/browser-window.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 7b143b8cca60..384b6e2a7129 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -148,15 +148,31 @@ Returns the window that is focused in this application. Find a window according to the `webContents` it owns +### Class Method: BrowserWindow.fromId(id) + +* `id` Integer + +Find a window according to its ID. + ### BrowserWindow.webContents The `WebContents` object this window owns, all web page related events and operations would be done via it. +**Note:** Users should never store this object because it may becomes `null` +when the web page has crashed. + ### BrowserWindow.devToolsWebContents Get the `WebContents` of devtools of this window. +**Note:** Users should never store this object because it may becomes `null` +when the devtools has been closed. + +### BrowserWindow.id + +Get the unique ID of this window. + ### BrowserWindow.destroy() Force closing the window, the `unload` and `beforeunload` event won't be emitted