GJ one your library
One random recommendation I could give based on my experimentations on both firefox and chromium
you can attach symbol based custom properties to each such dom node 'class'
and apart from using .matches(), symbol attribute check. this outperforms class based equality checks by a small margin.
very marginal but hey, you are clearly tryharding.
Thank you! Very interesting insight—I'll have a look.