Javascript/DOM
Element.matches
지구별72
2022. 2. 3. 14:57
https://goodmemory.tistory.com/117
[Javascript] CSS Selector를 통해 엘리먼트 구분하기 Element.matches()
[자바스크립트 / Javascript] CSS Selector를 통해 엘리먼트 구분하기 Element.matches() 기본 형태 //CSS Selector를 통해 엘리먼트 구분하기 //해당 엘리먼트와 셀렉터가 같다면 true | 다르다면 false 반환 el..
goodmemory.tistory.com
https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
Element.matches() - Web APIs | MDN
The matches() method checks to see if the Element would be selected by the provided selectorString -- in other words -- checks if the element "is" the selector.
developer.mozilla.org