improve domObserver

This commit is contained in:
Rene
2021-01-20 01:04:34 +01:00
parent d70a8aa99d
commit 323d05beec
19 changed files with 913 additions and 251 deletions
@@ -6,6 +6,11 @@ export const setTestResult = (result: boolean | null) => {
const elm = getTestResultElm();
if (elm) {
if (typeof result === 'boolean') {
if (result) {
if (elm.getAttribute('class') === 'failed') {
return;
}
}
elm.setAttribute('class', result ? 'passed' : 'failed');
} else {
elm.removeAttribute('class');