Search...
onCommentDownvoted( )
A backend event that fires when a forum comment is downvoted.
Description
The onCommentDownvoted()
event handler runs when an existing forum comment in your site is downvoted.
The received DownvotedComment
object contains information about the comment that was downvoted.
Notes:
Only comments on posts with a
postType
of"QUESTION"
can be voted on.Backend events are not fired when previewing your site.
Syntax
function onCommentDownvoted(event: DownvotedComment): void
onCommentDownvoted Parameters
NAME
TYPE
DESCRIPTION
event
DownvotedComment
Information about the forum comment that was downvoted.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when a forum comment is downvoted
Copy Code
1// Place this code in a file named events.js2// in the Backend section of your code files.34export function wixForum_onCommentDownvoted(event) {5 const downvotedCommentId = event.commentId;6 console.log("Comment downvoted");7}