Skip to content
Snippets Groups Projects
Verified Commit 7c84037e authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett
Browse files

Added Element extension with .matches and .closest

parent 75d15be9
No related branches found
No related tags found
No related merge requests found
/* eslint-disable */ /* global Element */
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatches; /* eslint-disable consistent-return, max-len */
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
   
Element.prototype.closest = function closest(selector, selectedElement = this) { Element.prototype.closest = function closest(selector, selectedElement = this) {
if (!selectedElement) return; if (!selectedElement) return;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment