CoreFiles by mySites.guru
wp-polyfill-node-contains.js30 lines, 531 bytes, from wordpress-5.7.21.zip
Raw History Compare with 5.7.20
md5
8e8cdd77e6e80407255b55c41dc533a6
sha1
42c9e582b7b78e9add1073c208b63b5d83e83012
sha256
76d6541d3c011cea86147e2718a8fa72e16313d07c2c318a3731e80f37099ffa
(function() {

	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;
	}

	// IE
	if ('HTMLElement' in this && 'contains' in HTMLElement.prototype) {
		try {
			delete HTMLElement.prototype.contains;
		} catch (e) {}
	}

	if ('Node' in this) {
		Node.prototype.contains = contains;
	} else {
		document.contains = Element.prototype.contains = contains;
	}

}());

The same content is in 300 releases, WordPress 5.0-beta1 to 5.7.22. See them all, or every version of this file.