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?
optionalclosable:boolean
closeOnEscape?
optionalcloseOnEscape:boolean
draggable?
optionaldraggable:boolean
modal?
optionalmodal:boolean
position?
optionalposition:"left"|"right"|"top"|"bottom"|"center"|"topleft"|"topright"|"bottomleft"|"bottomright"
title?
optionaltitle:string
GlobalContext
GlobalContext =
object
Represents the global context of the application.
Properties
page?
optionalpage: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
The current global context.
onContextChange()
onContextChange: (
callback: (context:GlobalContext) =>void) =>ListenerHandle
Subscribe to global context changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (context: GlobalContext) => void | The callback to call when the context changes. |
Returns
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
| Parameter | Type | Description |
|---|---|---|
component | ComponentDefinition | The custom slot content to display in the dialog. |
options? | DialogOptions | Options for the dialog. |
Returns
A dialog object that can be used to close the dialog.
showToast()
showToast: (
message:string,options?:object) =>void
Show a toast message.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to show. |
options? | { duration?: number; variant?: "success" | "error" | "warning" | "info"; } | Options for the toast message. |
options.duration? | number | The duration of the toast message in milliseconds. |
options.variant? | "success" | "error" | "warning" | "info" | The variant of the toast message. |
Returns
void
