Skip to main content

Function: toast()

function toast(workspace, options): void;

Defined in: packages/blockly/core/dialog.ts:156

Displays a temporary notification atop the workspace. Blockly provides a default toast implementation, but developers may provide their own via setToast. For simple appearance customization, CSS should be sufficient.

Parameters

ParameterTypeDescription
workspaceWorkspaceSvgThe workspace to display the toast notification atop.
optionsToastOptionsConfiguration options for the notification, including its message and duration.

Returns

void