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

Function navigateHistory

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

Source from the content-addressed store, hash-verified

1162 // focused window's navigation history. canGo* guards keep the keys no-ops at
1163 // the ends of the stack, matching how they behave in a browser.
1164 const navigateHistory = (direction: "back" | "forward") => {
1165 const nav = BrowserWindow.getFocusedWindow()?.webContents.navigationHistory;
1166 if (!nav) return;
1167 if (direction === "back") {
1168 if (nav.canGoBack()) nav.goBack();
1169 } else if (nav.canGoForward()) {
1170 nav.goForward();
1171 }
1172 };
1173 const historyMenu: MenuItemConstructorOptions = {
1174 label: "History",
1175 submenu: [

Callers 1

installApplicationMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected