How could I detect !important rule of style property for directed DOM element?
ex:
<div class = "class">
***content***
</div>
.class{
top: 45px!important;
}
let elmStyles = document.getElementsByClassName('class')[0].style;
/* i need this =====> */ let isImportant = elmStyles.getPropertyPriority("top");
I`ve found some info about that, but I can not apply it for concrete DOMelement https://developer.mozilla.org/ru/docs/Web/API/CSSStyleDeclaration/getPropertyPriority