Skip to content

Window ​

Dialog ​

Dialog = object

A dialog instance that can be closed programmatically.

Properties ​

close() ​

close: () => void

Returns ​

void


DialogOptions ​

DialogOptions = object

Options for configuring a dialog.

Properties ​

closable? ​

optional closable: boolean

closeOnEscape? ​

optional closeOnEscape: boolean

draggable? ​

optional draggable: boolean

optional modal: boolean

position? ​

optional position: "left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright"

title? ​

optional title: string


GlobalContext ​

GlobalContext = object

Represents the global context of the application.

Properties ​

page? ​

optional page: PageContext


PageContext ​

PageContext = AssistantPageContext | AutomatePageContext | BackupsPageContext | CertificatePageContext | ExportsPageContext | EnvironmentPageContext | FilterPageContext | FindingsPageContext | HTTPHistoryPageContext | ReplayPageContext | ScopePageContext | SearchPageContext | WorkflowsPageContext | ProjectsPageContext | FilesPageContext | MatchReplacePageContext | InterceptPageContext | SitemapPageContext | WebsocketPageContext

Represents the context of the current page.


WindowSDK ​

WindowSDK = object

Utilities to interact with the active page.

Properties ​

getActiveEditor() ​

getActiveEditor: () => Editor | undefined

Get the active editor.

Returns ​

Editor | undefined

The active editor.

getContext() ​

getContext: () => GlobalContext

Get the current global context.

Returns ​

GlobalContext

The current global context.

onContextChange() ​

onContextChange: (callback: (context: GlobalContext) => void) => ListenerHandle

Subscribe to global context changes.

Parameters ​
ParameterTypeDescription
callback(context: GlobalContext) => voidThe callback to call when the context changes.
Returns ​

ListenerHandle

An object with a stop method that can be called to stop listening to context changes.

showDialog() ​

showDialog: (component: ComponentDefinition, options?: DialogOptions) => Dialog

Show a dialog component.

Parameters ​
ParameterTypeDescription
componentComponentDefinitionThe custom slot content to display in the dialog.
options?DialogOptionsOptions for the dialog.
Returns ​

Dialog

A dialog object that can be used to close the dialog.

showToast() ​

showToast: (message: string, options?: object) => void

Show a toast message.

Parameters ​
ParameterTypeDescription
messagestringThe message to show.
options?{ duration?: number; variant?: "success" | "error" | "warning" | "info"; }Options for the toast message.
options.duration?numberThe duration of the toast message in milliseconds.
options.variant?"success" | "error" | "warning" | "info"The variant of the toast message.
Returns ​

void