From ee850cd6891549ef2afe0df82f9ed5c32241522c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Dieudonn=C3=A9?= Date: Thu, 17 Aug 2023 08:42:22 +0000 Subject: [PATCH] [IMP] web: removes contains() polyfill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mainly used for Internet Explorer support. ´contains´ is now supported by Edge. https://caniuse.com/mdn-api_node_contains closes odoo/odoo#132162 Signed-off-by: Romain Estievenart (res) --- addons/web/static/src/legacy/js/core/misc.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/addons/web/static/src/legacy/js/core/misc.js b/addons/web/static/src/legacy/js/core/misc.js index e0a957779a8..c2ef65dbf43 100644 --- a/addons/web/static/src/legacy/js/core/misc.js +++ b/addons/web/static/src/legacy/js/core/misc.js @@ -92,25 +92,6 @@ export function unblockUI() { return $.unblockUI.apply($, arguments); } - -// In Internet Explorer, document doesn't have the contains method, so we make a -// polyfill for the method in order to be compatible. -if (!document.contains) { - document.contains = function contains (node) { - if (!(0 in arguments)) { - throw new TypeError('1 argument is required'); - } - - do { - if (this === node) { - return true; - } - } while (node = node && node.parentNode); - - return false; - }; -} - export default { blockUI: blockUI, unblockUI: unblockUI,