Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

New API

Drupal.ajax is not a constructor anymore and it accepts only one parameter, much like jQuery.ajax().

Before

var ajaxSettings = {
  url: 'some/url'
};
new Drupal.ajax(id, element, ajaxSettings);

After

var ajaxSettings = {
  url: 'some/url',
  base: id,
  element: element
};
Drupal.ajax(ajaxSettings);

There is no need to have a dummy DOM element to trigger an ajax request. The ajax object has a new execute method to programatically trigger an ajax request using Drupal API.

var ajaxObject = Drupal.ajax({url: 'some/url.json'});
ajaxObject.execute();

All created ajax objects are automatically stored in the Drupal.ajax.instances array.

Before

new Drupal.ajax('ckeditor-dialog', $content.find('a').get(0), {
  /* ajax settings */
  event: 'ckeditor-internal.ckeditor'
});

$content.find('a')
  .on('click', function () { return false; })
  .trigger('ckeditor-internal.ckeditor');

After

var ckeditorAjaxDialog = Drupal.ajax({/* ajax settings */});
ckeditorAjaxDialog.execute();
Impacts: 
Module developers