code: function ajaxBeforeSend(xhr, settings) {
          var context = settings.context;
          if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [
                  xhr,
                  settings
              ]) === false)
              return false;
  
          triggerGlobal(settings, context, 'ajaxSend', [
              xhr,
              settings
          ]);
      }
docs: triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable