Browse Source

docs: event.newGuest for new-window in WebContents and webContents in BrowsweWindow's constructor (#23356)

* docs: `newGuest` in `WebContents` and `webContents` in `BrowsweWindow`

According to the example codes in the documentation of `new-window`
event in `WebContents`, `webContents` in `BrowsweWindow` constructor
options and `newGuest` in `event` argument of `new-window` handler are
both existing but documented. This patch is for adding the related
documentations. Also, it provides typescript-definitations for these
two properties.

* Remove the documnent of `webContents` in BrowserWindow constructor option.

Co-authored-by: Sean Lee <[email protected]>
trop[bot] 5 years ago
parent
commit
b62df312f2
3 changed files with 6 additions and 1 deletions
  1. 4 0
      docs/api/structures/new-window-event.md
  2. 1 1
      docs/api/web-contents.md
  3. 1 0
      filenames.auto.gni

+ 4 - 0
docs/api/structures/new-window-event.md

@@ -0,0 +1,4 @@
+# NewWindowEvent Object extends `Event`
+
+* `newGuest` BrowserWindow (optional)
+

+ 1 - 1
docs/api/web-contents.md

@@ -138,7 +138,7 @@ Emitted when page receives favicon urls.
 
 Returns:
 
-* `event` Event
+* `event` NewWindowEvent
 * `url` String
 * `frameName` String
 * `disposition` String - Can be `default`, `foreground-tab`, `background-tab`,

+ 1 - 0
filenames.auto.gni

@@ -96,6 +96,7 @@ auto_filenames = {
     "docs/api/structures/mime-typed-buffer.md",
     "docs/api/structures/mouse-input-event.md",
     "docs/api/structures/mouse-wheel-input-event.md",
+    "docs/api/structures/new-window-event.md",
     "docs/api/structures/notification-action.md",
     "docs/api/structures/point.md",
     "docs/api/structures/printer-info.md",