sud.hideToast
Closes the toast message displayed by sud.showToast.
javascript
sud.hideToast(object);Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| success | function | No | Called on success; no additional result fields |
| fail | function | No | Called on failure; see the fields below |
| complete | function | No | Called after success or failure, with no arguments |
Failure Callback Parameters
| Property | Type | Description |
|---|---|---|
| errCode | number | Error code |
| errMsg | string | Error description |
Usage Notes
Confirm that the target app supports this UI feature before using it. Use this API to close a toast before its display duration ends.
Example
javascript
sud.hideToast({
fail(error) {
console.error('Failed to hide toast', error.errCode, error.errMsg);
}
});