Review 10.4 Abandoned

65578[TASK] Streamline AjaxDataHandler

Oliver Hader CR 0 V 0 Hard +295 −112 updated 11/04/21, 12:59

Commit message

* Streamlines messages being sent in AjaxDataHandler

  The same event was emitted twice as message to BroadcastChannel and
  as CustomEvent to current document - now it's only broadcasted, which
  internall emits to currrent document (in case there's a subscription)

  Event names have been streamlined and now are
  * typo3:ajax-data-handler:process-failed (+ meta-data, response)
  * typo3:ajax-data-handler:process-successed (+ meta-data, response)

* Listens to incoming broadcast messages

  Using message type `typo3:ajax-data-handler:instruction@<token>`, the
  internal AjaxDataHandler processing can be triggered for knwon actions.
  `<token>` is an internal random value to ensure that each instance of
  AjaxDataHandler is only handling responses they actually initiated.

These changes allow https://github.com/FriendsOfTYPO3/sudo-mode to
intercept and handle failed requests to server-side DataHandler.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 10