Listen to these through the EventDispatcher service. They are not
dispatched on window.
TaskEventType.Success and TaskEventType.Failed are cancelable.
Call preventDefault() on the event to stop the default notification, for
example to show your own message instead.
// Remember to remove the listeners in `disconnectedCallback()` eventDispatcher.removeListener(TaskEventType.Success, onTaskSuccess); eventDispatcher.removeListener(TaskEventType.Failed, onTaskFailure);
Events dispatched by the task service
Listen to these through the EventDispatcher service. They are not dispatched on
window.TaskEventType.Success and TaskEventType.Failed are cancelable. Call
preventDefault()on the event to stop the default notification, for example to show your own message instead.Example: Listening to task events