Added detection of classList, for efficiency