This project is not covered by Drupal’s security advisory policy.

Provides for a Javascript event when Views ajax has completed.
This module is useful for projects which do not use JQuery. If jQuery is being used then the ajaxComplete event should suffice.

Features

- Raise the event views_ajax_completed_event:views_ajax_completed on the document object when Views ajax has completed.
- The view_name and the view_display_id can be obtained from the detail property on the event object.

Example code:

(function(Drupal) {
  "use strict";

  Drupal.behaviors.testViewsAjaxCompleted = {
    attach: function(context, settings) {
      if (context === document) {
        document
        .addEventListener('views_ajax_completed_event:views_ajax_completed', function(e) {
          const messages = new Drupal.Message();
          messages.add('Caught Event: views_ajax_completed_event:views_ajax_completed');
          messages.add('event.detail: ' + JSON.stringify(e.detail));
        });
      }
    },
  };
})(Drupal);
Supporting organizations: 
Provides development and maintenance time

Project information

Releases