mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 21:41:40 +00:00
1.4 release
This commit is contained in:
parent
49405727d5
commit
291ef7d888
3
dist/htmx.js
vendored
3
dist/htmx.js
vendored
@ -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
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.
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user