This repository has been archived on 2020-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
counter/frontend/components/counter-count/counter-count.js

13 lines
297 B
JavaScript
Raw Normal View History

import "./counter-count.pcss";
import { setCallback } from "client/counter";
window.addEventListener("DOMContentLoaded", () => {
const currentCount = document.querySelector(".count");
if (currentCount) {
setCallback((message) => {
currentCount.innerHTML = message;
});
}
});