(button: ToastButton)
| 531 | } |
| 532 | |
| 533 | private async buttonClick(button: ToastButton) { |
| 534 | const role = button.role; |
| 535 | if (isCancel(role)) { |
| 536 | return this.dismiss(undefined, role); |
| 537 | } |
| 538 | const shouldDismiss = await this.callButtonHandler(button); |
| 539 | if (shouldDismiss) { |
| 540 | return this.dismiss(undefined, role); |
| 541 | } |
| 542 | return Promise.resolve(); |
| 543 | } |
| 544 | |
| 545 | private async callButtonHandler(button: ToastButton | undefined) { |
| 546 | if (button?.handler) { |
no test coverage detected