Skip to content

Commit 3e54863

Browse files
authored
docs: event.newGuest for new-window in WebContents and webContents in BrowsweWindow's constructor (electron#21698)
* 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.
1 parent 64297e1 commit 3e54863

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# NewWindowEvent Object extends `Event`
2+
3+
* `newGuest` BrowserWindow (optional)
4+

docs/api/web-contents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Emitted when page receives favicon urls.
138138

139139
Returns:
140140

141-
* `event` Event
141+
* `event` NewWindowEvent
142142
* `url` String
143143
* `frameName` String
144144
* `disposition` String - Can be `default`, `foreground-tab`, `background-tab`,

filenames.auto.gni

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ auto_filenames = {
100100
"docs/api/structures/mime-typed-buffer.md",
101101
"docs/api/structures/mouse-input-event.md",
102102
"docs/api/structures/mouse-wheel-input-event.md",
103+
"docs/api/structures/new-window-event.md",
103104
"docs/api/structures/notification-action.md",
104105
"docs/api/structures/point.md",
105106
"docs/api/structures/post-body.md",

0 commit comments

Comments
 (0)