MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / navigateHistory

Function navigateHistory

apps/desktop/src/main/index.ts:1115–1123  ·  view source on GitHub ↗
(direction: "back" | "forward")

Source from the content-addressed store, hash-verified

1113 // focused window's navigation history. canGo* guards keep the keys no-ops at
1114 // the ends of the stack, matching how they behave in a browser.
1115 const navigateHistory = (direction: "back" | "forward") => {
1116 const nav = BrowserWindow.getFocusedWindow()?.webContents.navigationHistory;
1117 if (!nav) return;
1118 if (direction === "back") {
1119 if (nav.canGoBack()) nav.goBack();
1120 } else if (nav.canGoForward()) {
1121 nav.goForward();
1122 }
1123 };
1124 const historyMenu: MenuItemConstructorOptions = {
1125 label: "History",
1126 submenu: [

Callers 1

installApplicationMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected