UNPKG

@progress/kendo-angular-common

Version:
26 lines (25 loc) 921 B
/**----------------------------------------------------------------------------------------- * Copyright © 2020 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findElement = function (node, predicate, matchSelf) { if (matchSelf === void 0) { matchSelf = true; } if (!node) { return; } if (matchSelf && predicate(node)) { return node; } node = node.firstChild; while (node) { if (node.nodeType === 1) { var element = exports.findElement(node, predicate); if (element) { return element; } } node = node.nextSibling; } };