Html – Does the e.matches() method traverse the DOM?
Does the e.matches() method have to traverse the DOM to evaluate the selector? I ask because of a situation such as: if ( e.matches('.class_1, .class_1 *') { /* Do something. */ } else if ( e.matches('.class_2, .class_2 *') { /*…