summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/extensions
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-10-17 17:14:46 +0000
committerLuke "Jared" Bennett <lbennett@gitlab.com>2016-10-31 23:18:10 +0000
commit7c84037e6caa5044ab391ef9d9e6a7528a856abe (patch)
tree26fc544cf913bbec76734f52574acc236cc0c0b5 /app/assets/javascripts/extensions
parent75d15be9b2a83ed53b752b9860dc4f0c2f1aba8d (diff)
downloadgitlab-ce-7c84037e6caa5044ab391ef9d9e6a7528a856abe.tar.gz
Added Element extension with .matches and .closestadd-matches-and-closest-element-extensions
Diffstat (limited to 'app/assets/javascripts/extensions')
-rw-r--r--app/assets/javascripts/extensions/element.js.es66
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/extensions/element.js.es6 b/app/assets/javascripts/extensions/element.js.es6
index c74fc9ad074..afb2f0d6956 100644
--- a/app/assets/javascripts/extensions/element.js.es6
+++ b/app/assets/javascripts/extensions/element.js.es6
@@ -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;