UNPKG

@angular-mdc/web

Version:
15 lines 1.16 kB
/** * @license * Copyright (c) Dominic Carretto * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/trimox/angular-mdc-web/blob/master/LICENSE */ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define("@angular-mdc/web/dom",["exports"],n):n(((e=e||self).ng=e.ng||{},e.ng.web=e.ng.web||{},e.ng.web.dom={}))}(this,(function(e){"use strict"; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var n="undefined"!=typeof Element&&!!Element.prototype.closest;function t(e,n){return e.matches?e.matches(n):e.msMatchesSelector(n)}e.closest=function(e,o){if(!(e instanceof Node))return null;for(var r=e;null!=r&&!(r instanceof Element);)r=r.parentNode;return r&&(n?r.closest(o):function(e,n){var o=e;for(;null!=o&&!(o instanceof Element&&t(o,n));)o=o.parentNode;return(o||null)}(r,o))},e.matches=t,Object.defineProperty(e,"__esModule",{value:!0})}));