Skip to content

sud.hideToast ​

Closes the toast message displayed by sud.showToast.

javascript
sud.hideToast(object);

Parameters ​

PropertyTypeRequiredDescription
successfunctionNoCalled on success; no additional result fields
failfunctionNoCalled on failure; see the fields below
completefunctionNoCalled after success or failure, with no arguments

Failure Callback Parameters ​

PropertyTypeDescription
errCodenumberError code
errMsgstringError 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);
  }
});