UNPKG

@testing-library/user-event

Version:
17 lines (13 loc) 357 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function findClosest(element, callback) { let el = element; do { if (callback(el)) { return el; } el = el.parentElement; }while (el && el !== element.ownerDocument.body) return undefined; } exports.findClosest = findClosest;