Sha256: 7de80b57056db31a01e4658fbb25033bec7ec03fb83d94a1bc951437be80dc99
Contents?: true
Size: 739 Bytes
Versions: 75
Compression:
Stored size: 739 Bytes
Contents
import '../vendor/polyfills/Element/prototype/closest.mjs'; /** * Returns the value of the given attribute closest to the given element (including itself) * * @deprecated Will be made private in v5.0 * @param {Element} $element - The element to start walking the DOM tree up * @param {string} attributeName - The name of the attribute * @returns {string | null} Attribute value */ function closestAttributeValue ($element, attributeName) { var $closestElementWithAttribute = $element.closest('[' + attributeName + ']'); return $closestElementWithAttribute ? $closestElementWithAttribute.getAttribute(attributeName) : null } export { closestAttributeValue }; //# sourceMappingURL=common/closest-attribute-value.mjs.map
Version data entries
75 entries across 75 versions & 1 rubygems