From ed436ec8ec42c3edc30b61ba825e872b8b09127e Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Sat, 3 Jul 2021 17:55:31 +0200 Subject: [PATCH] Removed polyfills --- src/utils/index.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index eabe418..22772a8 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,29 +1,5 @@ import I18n from '../i18n'; -/** - * Adds DOM polyfills that babel polyfill doesn't include - */ -export const addPolyfills = () => { - - if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.msMatchesSelector || - Element.prototype.webkitMatchesSelector; - } - - if (!Element.prototype.closest) { - Element.prototype.closest = function(s) { - let el = this; - - do { - if (Element.prototype.matches.call(el, s)) return el; - el = el.parentElement || el.parentNode; - } while (el !== null && el.nodeType === 1); - return null; - }; - } - -} - /** * Helper to init the i18n class with a pre-defined or auto-detected locale. */