目录

MessageDialogOptions

Options for opening a message dialog.

Example 

import { app } from '@mobrowser/api';

const win = app.createWindow()
app.showMessageDialog({
  parentWindow: win,
  title: 'Confirm',
  message: 'Do you want to continue?',
  buttons: [
    { label: 'Cancel', type: 'secondary' },
    { label: 'OK', type: 'primary' }
  ]
})

Properties 

parentWindow 

readonly parentWindow?: BrowserWindow;

The parent window of the dialog. If provided, the dialog will be modal relative to the parent window. Otherwise, the dialog will be modal relative to the application.

title 

readonly title?: string;

The title of the dialog.

On macOS the dialog title is not displayed.

message 

readonly message?: string;

The message to be displayed in the dialog.

informativeText 

readonly informativeText?: string;

The informative text to be displayed in the dialog.

type 

readonly type?: MessageDialogType;

The type of the dialog.

textFields 

readonly textFields?: MessageDialogTextField[];

The text fields to be displayed in the dialog.

buttons 

readonly buttons: MessageDialogButton[];

The buttons to be displayed in the dialog.

checkbox 

readonly checkbox?: MessageDialogCheckbox;

The checkbox of the dialog to get additional user input. For example, to ask user whether the dialog should be suppressed in the future or not.