Skip to content

Commit 7a6a5cb

Browse files
committed
chore: Satisfy the linter and clarify comments.
1 parent 770880f commit 7a6a5cb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/html_toast.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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
*/
1923
class 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+
*/
4752
export function registerHtmlToast() {
4853
Blockly.dialog.setToast(HtmlToast.show.bind(HtmlToast));
4954
}

0 commit comments

Comments
 (0)