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

Previously Ajax commands were shared across all Ajax objects causing problems when users relied on the behavior described in the documentation.

The code has been corrected to conform to the documentation and a new object holding all Ajax commands has been declared: Drupal.AjaxCommands

To implement a custom Ajax command:

Drupal 7

Drupal.ajax.prototype.commands.customCommand = function () {};

Drupal 8

Drupal.AjaxCommands.prototype.customCommand = function () {};

See #2019481: JavaScript AJAX commands object is borked: it is shared among all Drupal.ajax instances, preventing scoped overrides for a detailed description of the problems in Drupal 7.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done