Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
A method for determining whether a DOM element match a specific selector. Previously known as matchesSelector and widely supported with prefix.
Last updated on : 2023-03-20
Browser Versions
IE
Edge
Firefox
Chrome
Safari
Opera
Fully Supported
Partially
No Support
DOM Standard # ref-for-dom-element-matches①
var result = element.matches(selectorString);
matches() DOM method on IE is partially supported on 9-11, and not supported on 5.5-8 IE versions.
matches() DOM method on Edge is fully supported on 15-111 and partially supported on 12-14 Edge versions.
matches() DOM method on Firefox is fully supported on 34-113, partially supported on 3.6-33, and not supported on 2-3 Firefox versions.
matches() DOM method on Chrome is fully supported on 34-114 and partially supported on 4-33 Chrome versions.
matches() DOM method on Safari is fully supported on 7.1-16.4, partially supported on 5.1-7, and not supported on 3.2-4 Safari versions.
matches() DOM method on Opera is fully supported on 21-95, partially supported on 11.5-20, and not supported on 9.5-11.1 Opera versions.
matches() DOM method on Safari on iOS is fully supported on 8.1-16.4, partially supported on 4.2-7, and not supported on 3.2-3.2 Safari on iOS versions.
matches() DOM method on Android Browser is fully supported on 97-111, partially supported on 2.3-4, and not supported on 2.1-2.1 Android Browser versions.
matches() DOM method on Opera Mobile is fully supported on 64-73, partially supported on 11.5-12, and not supported on 10-11 Opera Mobile versions.
matches() DOM method on Chrome for Android is fully supported on all Chrome for Android versions.
matches() DOM method on Firefox for Android is fully supported on all Firefox for Android versions.
matches() DOM method on Samsung Internet is fully supported on 5-20 and partially supported on 4-4 Samsung Internet versions.
Data sourced from
Overall Browser Compatibility Score
Note:matches() DOM method shows a browser compatibility score of 100. This is a collective score out of 100 to represent browser support of a web technology. The higher this score is, the greater is the browser compatibility. The browser compatibility score is not a 100% reflection for every browser and the web technology support. However, it does give you an estimate on how much you should rely on a particular web technology in terms of browser compatibility.
Test on 3000+ browsers for matches() DOM method & more
Test your website for matches() DOM method and other web technologies. Get 100 FREE automation test minutes!
Test NowKaneAI - Testing Assistant
World’s first AI-Powered E2E testing agent.
Did you find this page helpful?