Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / system / tests / modules / js_ajax_test / js / js_ajax_test.ajax.js
diff --git a/web/core/modules/system/tests/modules/js_ajax_test/js/js_ajax_test.ajax.js b/web/core/modules/system/tests/modules/js_ajax_test/js/js_ajax_test.ajax.js
new file mode 100644 (file)
index 0000000..b778339
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function ($, Drupal) {
+  Drupal.AjaxCommands.prototype.jsAjaxTestCommand = function (ajax, response) {
+    var $domElement = $(response.selector);
+    ajax.element_settings.cat = 'catbro';
+
+    var data = {
+      element_settings: ajax.element_settings.cat || {},
+      elementSettings: ajax.elementSettings.cat || {}
+    };
+
+    $domElement.html('<div id="js_ajax_test_form_element">' + JSON.stringify(data) + '</div>');
+  };
+})(jQuery, Drupal);
\ No newline at end of file