diff options
author | David O'Regan <doregan@gitlab.com> | 2022-05-20 16:25:30 +0300 |
---|---|---|
committer | David O'Regan <doregan@gitlab.com> | 2022-05-20 16:25:30 +0300 |
commit | d3d87971457ae38dacef0c83e12a04facd1699dc (patch) | |
tree | 39157585d449ab384fb95754c1f02630959f217c /content | |
parent | bcdf3ad23b2fef0fc358cb8398db38e56b90f109 (diff) | |
parent | 75dc608187a7bfcfd95ab644dd7a40f8d121ecbc (diff) |
Merge branch 'remove-polyfills' into 'main'
Remove unneeded polyfills
See merge request gitlab-org/gitlab-docs!2683
Diffstat (limited to 'content')
-rw-r--r-- | content/assets/javascripts/closest-polyfill.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/content/assets/javascripts/closest-polyfill.js b/content/assets/javascripts/closest-polyfill.js deleted file mode 100644 index 6a10a113..00000000 --- a/content/assets/javascripts/closest-polyfill.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Polyfill for browsers that do not support Element.closest() - */ -if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.msMatchesSelector || - Element.prototype.webkitMatchesSelector; -} - -if (!Element.prototype.closest) { - Element.prototype.closest = function(s) { - var el = this; - - do { - if (el.matches(s)) return el; - el = el.parentElement || el.parentNode; - } while (el !== null && el.nodeType === 1); - return null; - }; -} |