MCPcopy Create free account
hub / github.com/firebase/quickstart-js / deleteComment

Function deleteComment

database/scripts/main.ts:419–422  ·  view source on GitHub ↗

* Deletes the comment of the given ID in the given postElement.

(postElement: HTMLElement, id: string)

Source from the content-addressed store, hash-verified

417 * Deletes the comment of the given ID in the given postElement.
418 */
419function deleteComment(postElement: HTMLElement, id: string) {
420 const comment = postElement.getElementsByClassName('comment-' + id)[0];
421 comment.parentElement!.removeChild(comment);
422}
423
424/**
425 * Starts listening for new posts and populates posts lists.

Callers 1

createPostElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected