final dist generation

This commit is contained in:
carson
2020-06-19 10:56:14 -07:00
parent dca42db7d9
commit a8832f6ec3
6 changed files with 28 additions and 7 deletions

7
dist/htmx.js vendored
View File

@@ -334,14 +334,17 @@ return (function () {
}
}
var EXCLUDED_ATTRIBUTES = ['id', 'value'];
function cloneAttributes(mergeTo, mergeFrom) {
forEach(mergeTo.attributes, function (attr) {
if (!mergeFrom.hasAttribute(attr.name)) {
if (!mergeFrom.hasAttribute(attr.name) && EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.removeAttribute(attr.name)
}
});
forEach(mergeFrom.attributes, function (attr) {
mergeTo.setAttribute(attr.name, attr.value);
if (EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.setAttribute(attr.name, attr.value);
}
});
}

2
dist/htmx.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/htmx.min.js.gz vendored

Binary file not shown.

View File

@@ -334,14 +334,17 @@ return (function () {
}
}
var EXCLUDED_ATTRIBUTES = ['id', 'value'];
function cloneAttributes(mergeTo, mergeFrom) {
forEach(mergeTo.attributes, function (attr) {
if (!mergeFrom.hasAttribute(attr.name)) {
if (!mergeFrom.hasAttribute(attr.name) && EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.removeAttribute(attr.name)
}
});
forEach(mergeFrom.attributes, function (attr) {
mergeTo.setAttribute(attr.name, attr.value);
if (EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.setAttribute(attr.name, attr.value);
}
});
}

View File

@@ -334,14 +334,17 @@ return (function () {
}
}
var EXCLUDED_ATTRIBUTES = ['id', 'value'];
function cloneAttributes(mergeTo, mergeFrom) {
forEach(mergeTo.attributes, function (attr) {
if (!mergeFrom.hasAttribute(attr.name)) {
if (!mergeFrom.hasAttribute(attr.name) && EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.removeAttribute(attr.name)
}
});
forEach(mergeFrom.attributes, function (attr) {
mergeTo.setAttribute(attr.name, attr.value);
if (EXCLUDED_ATTRIBUTES.indexOf(attr.name) === -1) {
mergeTo.setAttribute(attr.name, attr.value);
}
});
}

View File

@@ -444,6 +444,7 @@ describe("Core htmx AJAX Tests", function(){
return false;
});
div.click();
this.server.respond();
path.should.not.be.null;
});
@@ -456,8 +457,19 @@ describe("Core htmx AJAX Tests", function(){
return false;
});
div.click();
this.server.respond();
path.should.not.be.null;
});
it('input values are not settle swapped (causes flicker)', function()
{
this.server.respondWith("GET", "/test", "<input id='i1' value='bar'/>");
var input = make("<input id='i1' hx-get='/test' value='foo' hx-swap='outerHTML settle:50' hx-trigger='click'/>");
input.click();
this.server.respond();
input = byId('i1');
input.value.should.equal('bar');
});
})