mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-09 10:02:27 +03:00
improve domObserver
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user