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

Function updateStarCount

database/scripts/main.ts:371–375  ·  view source on GitHub ↗

* Updates the number of stars displayed for a post.

(postElement: HTMLElement, nbStart: number)

Source from the content-addressed store, hash-verified

369 * Updates the number of stars displayed for a post.
370 */
371function updateStarCount(postElement: HTMLElement, nbStart: number) {
372 (
373 postElement.getElementsByClassName('star-count')[0] as HTMLElement
374 ).innerText = nbStart.toString();
375}
376
377/**
378 * Creates a comment element and adds it to the given postElement.

Callers 1

createPostElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected