UNPKG

braintree-web

Version:

A suite of tools for integrating Braintree in the browser

19 lines (13 loc) 338 B
"use strict"; function findParentTags(element, tag) { var parent = element.parentNode; var parents = []; while (parent != null) { if (parent.tagName != null && parent.tagName.toLowerCase() === tag) { parents.push(parent); } parent = parent.parentNode; } return parents; } module.exports = findParentTags;