OptionalactionsDefines buttons of the message box. If not set, an OK button is displayed by default.
Each property in the object literal represents a button, with the property value used as the button label.
The label can be text or a translation key. A translation key starts with the percent symbol (%) and may include parameters in matrix notation for text interpolation.
Clicking a button closes the message box and returns the property key to the message box opener.
A button with the key 'cancel' is also assigned the Escape keystroke.
Example:
{
yes: 'Yes',
no: 'No',
cancel: 'Cancel',
}
OptionalcontentSpecifies if the user can select text displayed in the message box. Defaults to false.
OptionalcontextBinds the message box to a context (e.g., a part or view). Defaults to the calling context.
The message box is displayed only if the context is visible and closes when the context is disposed. The message box is opened in the center of its context, if any, unless opened from the peripheral area.
Set to null to open the message box outside a context.
OptionalcssSpecifies CSS class(es) to add to the message box, e.g., to locate the message box in tests.
OptionalmodalityControls which area of the application to block by the message box. Defaults to context.
One of:
context: Blocks a specific part of the application, as specified in context, defaulting to the calling context.application: Blocks the workbench or browser viewport, based on global workbench settings.view: Deprecated. Same as context. Marked for removal.OptionalparamsPasses data to the message box.
The message box can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
OptionalseveritySpecifies the severity of the message. Defaults to info.
OptionaltitleSpecifies the title of the message box.
Can be text or a translation key. A translation key starts with the percent symbol (%) and may include parameters in matrix notation for text interpolation.
Controls the appearance and behavior of a message box.