Post

Yeah that's what I was wondering about. It's tricky to observe CSS state in JS. It involves putting MutationObservers in all trees (f.e. shadow trees), monkey patching global APIs that MutationObserver might not catch, observing animation events, creating animation frame loops for animations, etc.