mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-03 15:55:39 +00:00
element-attribute decollission
check whether or not closest matching element is original element
This commit is contained in:
parent
e3abc3d7ac
commit
d65b1aa5b0
@ -127,10 +127,10 @@ return (function () {
|
||||
function getClosestAttributeValue(elt, attributeName) {
|
||||
var closestAttr = null;
|
||||
getClosestMatch(elt, function (e) {
|
||||
closestAttr = getAttributeValue(e, attributeName);
|
||||
if (closestAttr) {
|
||||
var inheritAttr = getAttributeValue(e, 'hx-inherit');
|
||||
if (inheritAttr === 'false' || inheritAttr.includes(attributeName)) {
|
||||
closestAttr = getAttributeValue(e, attributeName)
|
||||
if (closestAttr && elt !== e) {
|
||||
var inheritAttr = getAttributeValue(e, "hx-inherit");
|
||||
if (inheritAttr && (inheritAttr === "false" || inheritAttr.includes(attributeName))) {
|
||||
closestAttr = "unset";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user