Is there an event before and after form is submitted via ajax? Currently if a form is submitted via ajax is will show the throbber and "please wait" message(which can be configured on the ajaxified button that submits the form.

I would like to perform some additional actions before and after the form is submitted via ajax so I am looking for events that are being triggered and on which elements they are being triggered.
When you look in ajax.js you find several prototype functions, that can be used like hooks in drupal:

core/misc/ajax.js:

 /**
   * Modify form values prior to form submission.
   *
   * @param {object} form_values
   * @param {HTMLElement} element
   * @param {object} options
   */
  Drupal.Ajax.prototype.beforeSubmit = function (form_values, element, options) {
    // This function is left empty to make it simple to override for modules
    // that wish to add functionality here.
  };


You can override this prototype-functions in your own js-file:

(function($) {
   var ajaxBeforeSubmitOriginal = Drupal.Ajax.prototype.beforeSubmit;
   Drupal.Ajax.prototype.beforeSubmit = function (form_values, element_settings, options) {

      // your code  

      // call original function since it can be already overridden 
      ajaxBeforeSubmitOriginal.call(this, form_values, element, options);
   }
})(jQuery);


This is the most basic version. More info: https://www.drupal.org/node/1372840