Navigation
NavigationSDK
NavigationSDK =
object
Utilities to interact with navigation.
Properties
addPage()
addPage: (
path:string,options:object) =>void
Add a page to the navigation.
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | The path of the page. |
options | { body: HTMLElement; onEnter?: () => void; topbar?: HTMLElement; } | Options for the page. |
options.body | HTMLElement | The body of the page. |
options.onEnter? | () => void | The callback to execute when the page is entered. |
options.topbar? | HTMLElement | The topbar of the page. |
Returns
void
goTo()
goTo: (
route:string| {id:Routes; }) =>void
Navigate to a route or path.
Parameters
| Parameter | Type | Description |
|---|---|---|
route | string | { id: Routes; } | The route to navigate to. Can be a route ID object or a custom path string. |
Returns
void
Example
sdk.navigation.goTo({ id: Routes.Replay });
sdk.navigation.goTo({ id: Routes.Projects });
sdk.navigation.goTo("/my-plugin-page");onPageChange()
onPageChange: (
callback: (route:PageChangeEvent) =>void) =>ListenerHandle
Subscribe to page changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (route: PageChangeEvent) => void | The callback to call when the page changes. |
Returns
An object with a stop method that can be called to stop listening to page changes.
Example
const handler = sdk.navigation.onPageChange((event) => {
console.log('Page changed to:', event.routeId);
console.log('- path:', event.path);
});
// Later, stop listening
handler.stop();PageChangeEvent
PageChangeEvent = {
path:string;routeId:Routes;type:"Core"; } | {path:string;type:"Plugin"; }
Event fired when the page changes.
Routes
constRoutes:object
Available route identifiers in Caido.
Type Declaration
About
readonlyAbout:"About"
Assistant
readonlyAssistant:"Assistant"
Automate
readonlyAutomate:"Automate"
Backups
readonlyBackups:"Backups"
Certificate
readonlyCertificate:"Certificate"
Environment
readonlyEnvironment:"Environment"
Exports
readonlyExports:"Exports"
Files
readonlyFiles:"Files"
Filter
readonlyFilter:"Filter"
Findings
readonlyFindings:"Findings"
HTTPHistory
readonlyHTTPHistory:"HTTPHistory"
Intercept
readonlyIntercept:"Intercept"
MatchReplace
readonlyMatchReplace:"Tamper"
Plugins
readonlyPlugins:"Plugins"
Projects
readonlyProjects:"Projects"
Replay
readonlyReplay:"Replay"
Scope
readonlyScope:"Scope"
Search
readonlySearch:"Search"
Settings
readonlySettings:"Settings"
Sitemap
readonlySitemap:"Sitemap"
Websockets
readonlyWebsockets:"Websockets"
Workflows
readonlyWorkflows:"Workflows"
