mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-01-25 05:06:13 +00:00
final dist generation
This commit is contained in:
7
dist/htmx.js
vendored
7
dist/htmx.js
vendored
@@ -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
2
dist/htmx.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/htmx.min.js.gz
vendored
BIN
dist/htmx.min.js.gz
vendored
Binary file not shown.
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user