Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Last active November 1, 2018 08:07
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elijahmanor/6452535 to your computer and use it in GitHub Desktop.
Save elijahmanor/6452535 to your computer and use it in GitHub Desktop.
Element matches Polyfill
if (Element && !Element.prototype.matches) {
var proto = Element.prototype;
proto.matches = proto.matchesSelector ||
proto.mozMatchesSelector || proto.msMatchesSelector ||
proto.oMatchesSelector || proto.webkitMatchesSelector;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment