Last active
February 20, 2018 22:47
-
-
Save dalgard/7817372 to your computer and use it in GitHub Desktop.
Cross-browser wrapper for element.matchesSelector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function matchesSelector(dom_element, selector) { | |
var matchesSelector = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msM atchesSelector || dom_element.oMatchesSelector; | |
return matchesSelector.call(dom_element, selector); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo in
dom_element.msM atchesSelector
— odd space.