added callback in example

This commit is contained in:
jonny 2021-06-28 11:17:22 +02:00
parent 9643c7adf9
commit 917f3728d5
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ Displays a message at the bottom of the screen (that will disappear when space b
Example:
```javascript
const triggerMessage = WA.ui.triggerMessage("press 'space' to confirm");
const triggerMessage = WA.ui.triggerMessage("press 'space' to confirm",()=>{
WA.chat.sendChatMessage("confirmed", "trigger message logic")
});
setTimeout(()=>{
// later
triggerMessage.remove();