Download & Extend

Form API Ajax now handled by D8 Ajax API

Project: 
Drupal core
Introduced in branch: 
8.x
Description: 

A new AjaxController has been added to core to handle Ajax requests from Drupal's Ajax-enabled form elements and links. Ajax requests from elements using the '#ajax' property will be sent with the MIME type 'application/vnd.drupal-ajax.' Requests with that MIME type will be routed through a new AjaxController class, which will make sure that any returned content is packaged in an AjaxResponse.

Module developers can use the Ajax API just as they did in Drupal 7 in that a function handling an Ajax request can return HTML or a render array; AjaxController will wrap it properly for insertion on the page.

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
nobody click here