Closed mattgarkusha closed 8 years ago
According to caniuse, classList
isn't supported by Opera Mini or IE9 and lower. I don't think we care about either here, so I'm inclined to accept this patch.
Any objections?
Also, seems like we should also use classList.contains
instead of regex.text
or indexOf
on className
for consistency, and also to avoid exact matching issues on classes, such as matchThis
vs matchThis-123
. Appears we only do this in the example code, but still.
LGTM
adding and removing from classList instead of manually editing class