From 74ecec1e4eab5bd8c0f7de44fb29e82a46658dd3 Mon Sep 17 00:00:00 2001 From: Justin Halsall Date: Mon, 20 Nov 2023 22:49:12 +0100 Subject: [PATCH] Add `null` as type for `browserView.webContents` Fixes: https://github.com/electron/electron/issues/40567 `null` was introduced as a possibility for destroyed webContents in this PR: https://github.com/electron/electron/pull/25411 --- docs/api/browser-view.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/browser-view.md b/docs/api/browser-view.md index 4db9ebc300e43..dcb4aa838c521 100644 --- a/docs/api/browser-view.md +++ b/docs/api/browser-view.md @@ -41,7 +41,7 @@ Objects created with `new BrowserView` have the following properties: #### `view.webContents` _Experimental_ -A [`WebContents`](web-contents.md) object owned by this view. +Returns `WebContents | null` - The [web contents](web-contents.md) object owned by this view, or `null` when web contents were [destroyed](web-contents.md#event-destroyed). ### Instance Methods