mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-04 16:25:09 +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) {
|
function getClosestAttributeValue(elt, attributeName) {
|
||||||
var closestAttr = null;
|
var closestAttr = null;
|
||||||
getClosestMatch(elt, function (e) {
|
getClosestMatch(elt, function (e) {
|
||||||
closestAttr = getAttributeValue(e, attributeName);
|
closestAttr = getAttributeValue(e, attributeName)
|
||||||
if (closestAttr) {
|
if (closestAttr && elt !== e) {
|
||||||
var inheritAttr = getAttributeValue(e, 'hx-inherit');
|
var inheritAttr = getAttributeValue(e, "hx-inherit");
|
||||||
if (inheritAttr === 'false' || inheritAttr.includes(attributeName)) {
|
if (inheritAttr && (inheritAttr === "false" || inheritAttr.includes(attributeName))) {
|
||||||
closestAttr = "unset";
|
closestAttr = "unset";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user