5.9. Firing a success event

To fire a success event at a request, the implementation must run these steps:

  1. Let event be the result of creating an event using [Event](https://www.w3.org/TR/dom41/#event).

  2. Set event’s [type](https://www.w3.org/TR/dom41/#dom-event-type) attribute to “success“.

  3. Set event’s [bubbles](https://www.w3.org/TR/dom41/#dom-event-bubbles) and [cancelable](https://www.w3.org/TR/dom41/#dom-event-cancelable) attributes to false.

  4. Let transaction be request’s transaction.

  5. Let legacyOutputDidListenersThrowFlag be initially unset.

  6. Set transaction’s active flag.

  7. Dispatch event at request with legacyOutputDidListenersThrowFlag.

  8. Unset transaction’s active flag.

  9. If legacyOutputDidListenersThrowFlag is set, run the steps to abort a transaction with transaction and a newly created[AbortError](https://www.w3.org/TR/WebIDL-1/#aborterror)[DOMException](https://www.w3.org/TR/WebIDL-1/#idl-DOMException).