Module: common/errorMessage

Methods

(static) errorMessage(message, duration)

errorMessage dispatches an event with the error message in it.

Use this function in conjunction with the module:common/error-toast-sk element.

Events
Name Description
error-sk The event has a detail of the form:
{
  message: "some string",
  duration: (duration in milliseconds),
}
Parameters:
Name Type Description
message string | Object The value of 'message' is expected to be a string, an Object with a field 'message', or an Object.
duration number The number of milliseconds the message should be displayed.
Source: