fix: inspector context menu throwing an error (#29436)
This commit is contained in:
parent
dee4c4b908
commit
3b75549511
2 changed files with 1 additions and 2 deletions
|
@ -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}`);
|
||||
|
|
1
typings/internal-electron.d.ts
vendored
1
typings/internal-electron.d.ts
vendored
|
@ -56,7 +56,6 @@ declare namespace Electron {
|
|||
}
|
||||
|
||||
interface WebContents {
|
||||
_getURL(): string;
|
||||
_loadURL(url: string, options: ElectronInternal.LoadURLOptions): void;
|
||||
_stop(): void;
|
||||
_goBack(): void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue