diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/htmx.js | 2 | ||||
-rw-r--r-- | test/core/regressions.js | 33 | ||||
-rw-r--r-- | www/content/_index.md | 2 | ||||
-rw-r--r-- | www/content/docs.md | 2 |
7 files changed, 41 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fa3d5f0..8309ad66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## [1.9.10] - 2023-12-21 +## [1.9.12] - 2024-04-?? + +## [1.9.12] - 2023-12-21 * `hx-on*` attributes now support the form `hx-on-`, with a trailing dash, to better support template systems (such as EJS) that do not like double colons in HTML attributes. @@ -33,7 +33,7 @@ By removing these arbitrary constraints htmx completes HTML as a ## quick start ```html - <script src="https://unpkg.com/htmx.org@1.9.10"></script> + <script src="https://unpkg.com/htmx.org@1.9.11"></script> <!-- have a button POST a click via AJAX --> <button hx-post="/clicked" hx-swap="outerHTML"> Click Me diff --git a/package.json b/package.json index b5195adc..edf1d3c7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "AJAX", "HTML" ], - "version": "1.9.10", + "version": "1.9.11", "homepage": "https://htmx.org/", "bugs": { "url": "https://github.com/bigskysoftware/htmx/issues" diff --git a/src/htmx.js b/src/htmx.js index acd70dc0..20f4095e 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -89,7 +89,7 @@ return (function () { sock.binaryType = htmx.config.wsBinaryType; return sock; }, - version: "1.9.10" + version: "1.9.11" }; /** @type {import("./htmx").HtmxInternalApi} */ diff --git a/test/core/regressions.js b/test/core/regressions.js index a0f6724e..8f844cfb 100644 --- a/test/core/regressions.js +++ b/test/core/regressions.js @@ -212,4 +212,37 @@ describe("Core htmx Regression Tests", function(){ var input = byId("id_email"); input.value.should.equal("supertest@test.com"); }); + + it("script tags only execute once", function(done) { + window.i = 0; // set count to 0 + this.server.respondWith('GET', '/test', '<script>console.trace(); window.i++</script>') // increment the count by 1 + + // make a div w/ a short settle delay to make the problem more obvious + var div = make('<div hx-get="/test" hx-swap="innerHTML settle:5ms"/>'); + div.click(); + this.server.respond() + + setTimeout(function(){ + window.i.should.equal(1); + delete window.i; + done(); + }, 50) + }) + + it("script tags only execute once when nested", function(done) { + window.i = 0; // set count to 0 + this.server.respondWith('GET', '/test', '<p>foo</p><div><script>console.trace(); window.i++</script></div>') // increment the count by 1 + + // make a div w/ a short settle delay to make the problem more obvious + var div = make('<div hx-get="/test" hx-swap="innerHTML settle:5ms"/>'); + div.click(); + this.server.respond() + + setTimeout(function(){ + window.i.should.equal(1); + delete window.i; + done(); + }, 50) + }) + }); diff --git a/www/content/_index.md b/www/content/_index.md index c5011d6a..f5f3fa76 100644 --- a/www/content/_index.md +++ b/www/content/_index.md @@ -37,7 +37,7 @@ By removing these arbitrary constraints, htmx completes HTML as a [hypertext](ht <h2>quick start</h2> ```html - <script src="https://unpkg.com/htmx.org@1.9.10"></script> + <script src="https://unpkg.com/htmx.org@1.9.11"></script> <!-- have a button POST a click via AJAX --> <button hx-post="/clicked" hx-swap="outerHTML"> Click Me diff --git a/www/content/docs.md b/www/content/docs.md index 7fd82f3e..d004350b 100644 --- a/www/content/docs.md +++ b/www/content/docs.md @@ -114,7 +114,7 @@ The fastest way to get going with htmx is to load it via a CDN. You can simply a and get going: ```html -<script src="https://unpkg.com/htmx.org@1.9.10" integrity="sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC" crossorigin="anonymous"></script> +<script src="https://unpkg.com/htmx.org@1.9.11" integrity="sha384-TODO" crossorigin="anonymous"></script> ``` While the CDN approach is extremely simple, you may want to consider [not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn). |