File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ interface HtmlToastOptions extends Blockly.ToastOptions {
1515
1616/**
1717 * Custom toast implementation that supports HTML elements in toast messages.
18+ *
19+ * After registering, call
20+ `Blockly.dialog.toast(workspace, {element: <html element>, message: <text>});`
21+ * to display an HTML-based toast.
1822 */
1923class HtmlToast extends Blockly . Toast {
2024 /**
@@ -26,7 +30,7 @@ class HtmlToast extends Blockly.Toast {
2630 */
2731 protected static override createDom (
2832 workspace : Blockly . WorkspaceSvg ,
29- options : Blockly . ToastOptions ,
33+ options : HtmlToastOptions ,
3034 ) {
3135 const dom = super . createDom ( workspace , options ) ;
3236 const contents = dom . querySelector ( 'div' ) ;
@@ -43,7 +47,8 @@ class HtmlToast extends Blockly.Toast {
4347}
4448
4549/**
46- * Registers HtmlToast as the default toast implementation for Blockly. */
50+ * Registers HtmlToast as the default toast implementation for Blockly.
51+ */
4752export function registerHtmlToast ( ) {
4853 Blockly . dialog . setToast ( HtmlToast . show . bind ( HtmlToast ) ) ;
4954}
You can’t perform that action at this time.
0 commit comments