feat: deprecate <webview>.getWebContents() (#20726)
This commit is contained in:
parent
c716ecb916
commit
f1e7393e30
4 changed files with 50 additions and 2 deletions
|
@ -238,6 +238,12 @@ export const setupMethods = (WebViewElement: typeof ElectronInternal.WebViewElem
|
|||
return remote.getGuestWebContents(internal.guestInstanceId!)
|
||||
}
|
||||
|
||||
WebViewElement.prototype.getWebContents = electron.deprecate.moveAPI(
|
||||
WebViewElement.prototype.getWebContents,
|
||||
'webview.getWebContents()',
|
||||
'remote.webContents.fromId(webview.getWebContentsId())'
|
||||
) as any
|
||||
|
||||
// Focusing the webview should move page focus to the underlying iframe.
|
||||
WebViewElement.prototype.focus = function () {
|
||||
this.contentWindow.focus()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue