mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: remove unused internal method contents.canGoToIndex() (#50606)
refactor: remove unused internal method contents.canGoToIndex()
refactor: make WebContents::CanGoToIndex() private
The JS binding has been unused since 2021-04-27 #28839 0a1b26b1
This commit is contained in:
@@ -4605,7 +4605,6 @@ void WebContents::FillObjectTemplate(v8::Isolate* isolate,
|
||||
.SetMethod("_goForward", &WebContents::GoForward)
|
||||
.SetMethod("_canGoToOffset", &WebContents::CanGoToOffset)
|
||||
.SetMethod("_goToOffset", &WebContents::GoToOffset)
|
||||
.SetMethod("canGoToIndex", &WebContents::CanGoToIndex)
|
||||
.SetMethod("_goToIndex", &WebContents::GoToIndex)
|
||||
.SetMethod("_getActiveIndex", &WebContents::GetActiveIndex)
|
||||
.SetMethod("_getNavigationEntryAtIndex",
|
||||
|
||||
@@ -212,7 +212,6 @@ class WebContents final : public ExclusiveAccessContext,
|
||||
void GoForward();
|
||||
bool CanGoToOffset(int offset) const;
|
||||
void GoToOffset(int offset);
|
||||
bool CanGoToIndex(int index) const;
|
||||
void GoToIndex(int index);
|
||||
int GetActiveIndex() const;
|
||||
content::NavigationEntry* GetNavigationEntryAtIndex(int index) const;
|
||||
@@ -784,6 +783,8 @@ class WebContents final : public ExclusiveAccessContext,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
std::vector<std::u16string> types);
|
||||
|
||||
[[nodiscard]] bool CanGoToIndex(int index) const;
|
||||
|
||||
cppgc::Persistent<api::Session> session_;
|
||||
v8::Global<v8::Value> devtools_web_contents_;
|
||||
cppgc::Persistent<api::Debugger> debugger_;
|
||||
|
||||
1
typings/internal-electron.d.ts
vendored
1
typings/internal-electron.d.ts
vendored
@@ -118,7 +118,6 @@ declare namespace Electron {
|
||||
_getHistory(): Electron.NavigationEntry[];
|
||||
_restoreHistory(index: number, entries: Electron.NavigationEntry[]): void
|
||||
_clearHistory():void
|
||||
canGoToIndex(index: number): boolean;
|
||||
destroy(): void;
|
||||
// <webview>
|
||||
attachToIframe(embedderWebContents: Electron.WebContents, embedderFrameToken: string): void;
|
||||
|
||||
Reference in New Issue
Block a user