The module provides additional functionality for handling css and javascript
assets in ajax requests. It adds all the necessary ajax commands and libraries
to the render array.
Main benefits of the module:
- Cacheable Ajax GET requests. This will be a part of Drupal 10, see Ajax request type can be set to GET (POST by default)
- Ability to resolve assets when transferring requests using Views REST export or some middleware(e.g. web-sockets).
Example of usage
Use the ajax_assets_plus_example submodule as an example of usage. You can find the
test controller and javascript there. Also see the /tests folder.
Running javascript tests
To run the javascript tests the PhantomJS is required.
Instructions:
- Install PhantomJS.
- Start PhantomJS browser in the root folder of your Drupal 8 checkout:
/path/to/phantomjs --ssl-protocol=any --ignore-ssl-errors=true vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 - Start tests using PHPUnit.
Prerequisites
Attention: For views integration the Drupal core patch to fix Empty request in ViewExecutable::unserialize() on a cached ajax request is required.
Supporting organizations:
Concept, Development
Project information
Seeking new maintainer
The current maintainers are looking for new people to take ownership.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Developer tools
- Created by fago on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.

