/** * @file */ (function ($, Drupal) { Drupal.AjaxCommands.prototype.{{ method }} = function (ajax, response, status) { console.log(response.message); } })(jQuery, Drupal);