mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-29 22:11:22 +00:00
Added test child script nodes evaluate when first child
This commit is contained in:
parent
3e8c47df05
commit
28d47e91d5
@ -563,6 +563,23 @@ describe("Core htmx AJAX Tests", function(){
|
||||
}
|
||||
});
|
||||
|
||||
it('child script nodes evaluate when first child', function()
|
||||
{
|
||||
var globalWasCalled = false;
|
||||
window.callGlobal = function() {
|
||||
globalWasCalled = true;
|
||||
}
|
||||
try {
|
||||
this.server.respondWith("GET", "/test", "<script type='text/javascript'>callGlobal()</script><div></div>");
|
||||
var div = make("<div hx-get='/test'></div>");
|
||||
div.click();
|
||||
this.server.respond();
|
||||
globalWasCalled.should.equal(true);
|
||||
} finally {
|
||||
delete window.callGlobal;
|
||||
}
|
||||
});
|
||||
|
||||
it('child script nodes evaluate when not explicity marked javascript', function()
|
||||
{
|
||||
var globalWasCalled = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user