Added Element extension with .matches and .closest
This commit is contained in:
parent
75d15be9b2
commit
7c84037e6c
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
/* eslint-disable */
|
||||
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatches;
|
||||
/* global Element */
|
||||
/* eslint-disable consistent-return, max-len */
|
||||
|
||||
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
|
||||
|
||||
Element.prototype.closest = function closest(selector, selectedElement = this) {
|
||||
if (!selectedElement) return;
|
||||
|
|
Loading…
Reference in a new issue