diff --git a/lib/browser/devtools.ts b/lib/browser/devtools.ts index 7330cc4935..fbfc965b48 100644 --- a/lib/browser/devtools.ts +++ b/lib/browser/devtools.ts @@ -54,7 +54,7 @@ const isChromeDevTools = function (pageURL: string) { }; const assertChromeDevTools = function (contents: Electron.WebContents, api: string) { - const pageURL = contents._getURL(); + const pageURL = contents.getURL(); if (!isChromeDevTools(pageURL)) { console.error(`Blocked ${pageURL} from calling ${api}`); throw new Error(`Blocked ${api}`); diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index bf7f791272..f4d381fd63 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -56,7 +56,6 @@ declare namespace Electron { } interface WebContents { - _getURL(): string; _loadURL(url: string, options: ElectronInternal.LoadURLOptions): void; _stop(): void; _goBack(): void;