UNPKG

@progress/kendo-angular-common

Version:
13 lines (12 loc) 568 B
/**----------------------------------------------------------------------------------------- * Copyright © 2020 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ export var closestInScope = function (node, predicate, scope) { while (node && node !== scope && !predicate(node)) { node = node.parentNode; } if (node !== scope) { return node; } };