first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { findElementRecursive } from './findElementRecursive';
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
export function elementContainsAttribute(element, attribute, doc) {
var elementMatch = findElementRecursive(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);
}
//# sourceMappingURL=elementContainsAttribute.js.map