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

Function navigateHistory

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

Source from the content-addressed store, hash-verified

997 // focused window's navigation history. canGo* guards keep the keys no-ops at
998 // the ends of the stack, matching how they behave in a browser.
999 const navigateHistory = (direction: "back" | "forward") => {
1000 const nav = BrowserWindow.getFocusedWindow()?.webContents.navigationHistory;
1001 if (!nav) return;
1002 if (direction === "back") {
1003 if (nav.canGoBack()) nav.goBack();
1004 } else if (nav.canGoForward()) {
1005 nav.goForward();
1006 }
1007 };
1008 const historyMenu: MenuItemConstructorOptions = {
1009 label: "History",
1010 submenu: [

Callers 1

installApplicationMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected