Can I get specific css values using js?

Viewed 112

I'm messing around with css :hover effects and try to use computedStyleMap().get() to detect css changes while hovering. It works well in chrome, but is there any firefox alternative that can be used?

function myFunction() {
actualStyle = document.querySelector('.box-1').computedStyleMap().get('cursor');
actualStyle == 'pointer' ? true:false;
}

trying something like a element.addEventListener('mouseover', myFunction);

0 Answers
Related