dist/shards-vue.umd.js
function (selector, root) {
        if (!isElement(root)) {
            return null
        }

        var Closest = Element.prototype.closest ||
            function (sel) {
                var element = this;
                if (!document.documentElement.contains(element)) {
                    return null
                }

                do {
                    if (element.matches(sel)) {
                        return element
                    }

                    element = element.parentElement;
                } while (element !== null)

                return null
            };

        var el = Closest.call(root, selector);

        return el === root ? null : el
    }
function (selector, root) {
        if (!isElement(root)) {
            return null
        }

        var Closest = Element.prototype.closest ||
            function (sel) {
                var element = this;
                if (!document.documentElement.contains(element)) {
                    return null
                }

                do {
                    if (element.matches(sel)) {
                        return element
                    }

                    element = element.parentElement;
                } while (element !== null)

                return null
            };

        var el = Closest.call(root, selector);

        return el === root ? null : el
    }
function ( selector , root ) { if ( ! isElement ( root ) ) { return null } var Closest = Element . prototype . closest || function ( sel ) { var element = this ; if ( ! document . documentElement . contains ( element ) ) { return null } do { if ( element . matches ( sel ) ) { return element } element = element . parentElement ; } while ( element !== null ) return null } ; var el = Closest . call ( root , selector ) ; return el === root ? null : el }
Finds closest element matching selector.
Finds closest element matching selector .