We should verify that splitting and checking each individual class name matches the legacy behavior. I suspect it won't, since the legacy `hasClass()` uses a regex and would only match if all the specified classes occur in the same order.