From https://dom.spec.whatwg.org/#concept-getelementsbyclassname:
The comparisons for the classes must be done in an ASCII case-
insensitive manner if root’s node document’s mode is "quirks", and
in an identical to manner otherwise.
The generic is<T>() uses dynamic_cast which is fine in the majority
of cases, but when one of them shows up in profiles, we can make it
faster by answering the is-a question manually.