1.4 release

This commit is contained in:
carson 2021-05-25 09:12:52 -06:00
parent 49405727d5
commit 291ef7d888
6 changed files with 21 additions and 5 deletions

3
dist/htmx.js vendored
View File

@ -1374,7 +1374,8 @@ return (function () {
if (script.type === "text/javascript" || script.type === "") {
try {
maybeEval(script, function () {
Function(script.innerText)()
// wtf - https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript
(1, eval)(script.innerText);
});
} catch (e) {
logError(e);

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

@ -1374,7 +1374,8 @@ return (function () {
if (script.type === "text/javascript" || script.type === "") {
try {
maybeEval(script, function () {
Function(script.innerText)()
// wtf - https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript
(1, eval)(script.innerText);
});
} catch (e) {
logError(e);

View File

@ -1374,7 +1374,8 @@ return (function () {
if (script.type === "text/javascript" || script.type === "") {
try {
maybeEval(script, function () {
Function(script.innerText)()
// wtf - https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript
(1, eval)(script.innerText);
});
} catch (e) {
logError(e);

View File

@ -579,6 +579,19 @@ describe("Core htmx AJAX Tests", function(){
}
});
it('script nodes can define global functions', function()
{
try {
this.server.respondWith("GET", "/test", "<script type='text/javascript'>function foo() { return 42 }</script>");
var div = make("<div hx-get='/test'></div>");
div.click();
this.server.respond();
foo().should.equal(42);
} finally {
delete window.foo;
}
});
it('child script nodes evaluate when children', function()
{
var globalWasCalled = false;
@ -613,7 +626,7 @@ describe("Core htmx AJAX Tests", function(){
}
});
it('child script nodes evaluate when not explicity marked javascript', function()
it('child script nodes evaluate when not explicitly marked javascript', function()
{
var globalWasCalled = false;
window.callGlobal = function() {