Comments: trigger comments-loaded event on comments load.

Useful when apps want to know or do something with the comments,
like Dillo to parse emojis for example.
This commit is contained in:
Pablo Vazquez 2017-09-30 23:18:09 +02:00
parent e9233ff7c0
commit e4c5743852

View File

@ -147,6 +147,7 @@ function loadComments(commentsUrl)
.done(function(dataHtml) {
// Update the DOM injecting the generate HTML into the page
commentsContainer.html(dataHtml);
$('body').trigger('pillar:comments-loaded');
})
.fail(function(xhr) {
toastr.error('Could not load comments', xhr.responseText);