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

Function navigateHistory

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

Source from the content-addressed store, hash-verified

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

Callers 1

installApplicationMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected