AJAX assets plus
Categories
Component ID
2862549
Component name
AJAX assets plus
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
359
Component created
Component changed
Component body
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.
- 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.
