onBeforeAdd

fires before a new comment is added

void onBeforeAdd(number id,object obj,number index);
id
numberthe ID of the new comment obj
objectthe comment object index
numberthe position of the new comment within the comment history

Example

$$("comments").attachEvent("onBeforeAdd",function(id,obj,index){
    // your code here
    const day = obj.date.getDay();
});

See also
  • API
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.