WordPress/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js
desrosj bca7495bac External Libraries: Update element-closest.
This updates the `element-closest` polyfill to the latest version, `3.0.2`.

Because of changes to how the package is now built and distributed, both files for the library now contain minified code.

This library is no longer used by Core itself and maintained as a courtesy. Any projects utilizing it should reevaluate their usage requirements with modern browsers.

Props hareesh-pillai, gziolo, mukesh27, costdev.
Fixes #52851.
Built from https://develop.svn.wordpress.org/trunk@55275


git-svn-id: http://core.svn.wordpress.org/trunk@54808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:48:31 +00:00

1 line
426 B
JavaScript

!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})}();