[IMP] web: removes contains() polyfill
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) <res@odoo.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user