--- a/wp/wp-includes/js/dist/vendor/wp-polyfill-node-contains.js Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/js/dist/vendor/wp-polyfill-node-contains.js Wed Sep 21 18:19:35 2022 +0200
@@ -1,3 +1,5 @@
+
+// Node.prototype.contains
(function() {
function contains(node) {
@@ -9,19 +11,21 @@
if (this === node) {
return true;
}
+ // eslint-disable-next-line no-cond-assign
} while (node = node && node.parentNode);
return false;
}
// IE
- if ('HTMLElement' in this && 'contains' in HTMLElement.prototype) {
+ if ('HTMLElement' in self && 'contains' in HTMLElement.prototype) {
try {
delete HTMLElement.prototype.contains;
+ // eslint-disable-next-line no-empty
} catch (e) {}
}
- if ('Node' in this) {
+ if ('Node' in self) {
Node.prototype.contains = contains;
} else {
document.contains = Element.prototype.contains = contains;