I have created a custom module with ajax call, which are sending render form data that I receive in my ajax prototype in a js file like below.
Drupal.AjaxCommands.prototype.loadCommentFormCommand = function (ajax, response, status) {
if ($('#comment-form-wrapper').length === 0) {
$('.wall-posts').prepend(response.html);
Drupal.attachBehaviors(response.html);
}
};
But it's showing me
context.querySelectorAll is not a function
Error. Does anyone face similar error or have some solutions for this?