提交 c9cfac69 编写于 作者: J Jackson Kearl

reset counter on new label

上级 703b916a
......@@ -53,14 +53,19 @@ export function status(msg: string): void {
let repeatedTimes = 0;
let prevText: string | undefined = undefined;
function insertMessage(target: HTMLElement, msg: string): void {
if (!ariaContainer) {
// console.warn('ARIA support needs a container. Call setARIAContainer() first.');
return;
}
if (prevText === msg) { repeatedTimes++; }
prevText = msg;
if (prevText === msg) {
repeatedTimes++;
}
else {
prevText = msg;
repeatedTimes = 0;
}
switch (repeatedTimes) {
case 0: break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册