diff --git a/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js b/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js index ac49886348..913f9ea194 100644 --- a/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js +++ b/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js @@ -1,33 +1 @@ -// element-closest | CC0-1.0 | github.com/jonathantneal/closest - -(function (ElementProto) { - if (typeof ElementProto.matches !== 'function') { - ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) { - var element = this; - var elements = (element.document || element.ownerDocument).querySelectorAll(selector); - var index = 0; - - while (elements[index] && elements[index] !== element) { - ++index; - } - - return Boolean(elements[index]); - }; - } - - if (typeof ElementProto.closest !== 'function') { - ElementProto.closest = function closest(selector) { - var element = this; - - while (element && element.nodeType === 1) { - if (element.matches(selector)) { - return element; - } - - element = element.parentNode; - } - - return null; - }; - } -})(window.Element.prototype); +!function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window); diff --git a/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js b/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js index 4ff4111698..490d8d35cc 100644 --- a/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js +++ b/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js @@ -1 +1 @@ -!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),n=0;o[n]&&o[n]!==t;)++n;return Boolean(o[n])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype); \ No newline at end of file +!function(e){var t=window.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(); \ No newline at end of file diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 359e172a7f..a150dd9474 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -114,7 +114,7 @@ function wp_default_packages_vendor( $scripts ) { 'wp-polyfill-node-contains' => '4.6.0', 'wp-polyfill-url' => '3.6.4', 'wp-polyfill-dom-rect' => '4.6.0', - 'wp-polyfill-element-closest' => '2.0.2', + 'wp-polyfill-element-closest' => '3.0.2', 'wp-polyfill-object-fit' => '2.3.5', 'wp-polyfill-inert' => '3.1.2', 'wp-polyfill' => '3.15.0', diff --git a/wp-includes/version.php b/wp-includes/version.php index 6f23275941..f14cf47193 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55274'; +$wp_version = '6.2-alpha-55275'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.