I want to listen for element style changes (in particular in the case of :hover
and/or insertRule
). I can calculate the actual style with getComputedStyle
and clone it into another object and then make diff every mouseenter
/mouseleave
(or MutationObserver
), but it seems like rather low-performance solution for me. Is there any better way to track the element style changes?
Thanks.