INNER CODE UNIT · JavaScript
startDot
Picovoice/picollm · demo/web/completion/src/main.js:97
const startDot = () => {
if (dotInterval) {
clearInterval(dotInterval);
}
dotInterval = setInterval(() => {
dotIdx = (dotIdx + 1) % 4;
let dotText = "";
for (let i = 0; i < dotIdx; i++) {
dotText += ".";
}
dotdotdot.innerText = dotText;
}, 500);
};
const stopDot = () => {
if (dotInterval) {
clearInterval(dotInterval);
}