installBackNavigation function

Module @runic-artifex/views in @runic-artifex/views 0.23.0

function installBackNavigation(options?: BackNavigationOptions): () => void;

Maps the mouse's Back button (button 3), Alt+Left, Cmd+[ on macOS and the keyboard's Browser Back key to the window's Back, so they go back in its innermost presented region on Runic Desktop and CS-WebUI alike. While installNavigationPath is active they go back in the page's history instead, whose popstate then opens the previous path, so a Back never runs twice; at the first history entry they fall back to navigateBack. The page's own handlers win: an event whose default was prevented is left alone, and Alt+Left and Cmd+[ are left to text fields. Keys and mouse buttons inside an iframe go to the iframe's document and don't reach these handlers. Returns a function that removes them.