Sourcecode in Story/objectFunctions.js:
1: function deleteComment(commentObj) {
2: for (var i=commentObj.size();i>0;i--)
3: this.deleteComment(commentObj.get(i-1));
4: // also remove from comment's parent since it has
5: // cachemode set to aggressive and wouldn't refetch
6: // its child collection index otherwise
7: (commentObj.parent ? commentObj.parent : this).removeChild(commentObj);
8: this.comments.removeChild(commentObj);
9: commentObj.remove();
10: return new Message("commentDelete");
11: }
|