release prep

This commit is contained in:
carson 2021-04-05 07:45:51 -06:00
parent b44569a9db
commit 25b5aa337f
8 changed files with 42 additions and 5 deletions

View File

@ -35,7 +35,7 @@ By removing these arbitrary constraints htmx completes HTML as a
```html ```html
<!-- Load from unpkg --> <!-- Load from unpkg -->
<script src="https://unpkg.com/htmx.org@1.3.2" ></script> <script src="https://unpkg.com/htmx.org@1.3.3" ></script>
<!-- have a button POST a click via AJAX --> <!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML"> <button hx-post="/clicked" hx-swap="outerHTML">
Click Me Click Me

BIN
dist/htmx.min.js.gz vendored

Binary file not shown.

View File

@ -5,7 +5,7 @@
"AJAX", "AJAX",
"HTML" "HTML"
], ],
"version": "1.3.4", "version": "1.3.3",
"homepage": "https://htmx.org/", "homepage": "https://htmx.org/",
"bugs": { "bugs": {
"url": "https://github.com/bigskysoftware/htmx/issues" "url": "https://github.com/bigskysoftware/htmx/issues"

View File

@ -101,7 +101,7 @@ It can be used via [NPM](https://www.npmjs.com/) as "`htmx.org`" or downloaded o
[unpkg](https://unpkg.com/browse/htmx.org/) or your other favorite NPM-based CDN: [unpkg](https://unpkg.com/browse/htmx.org/) or your other favorite NPM-based CDN:
``` html ``` html
<script src="https://unpkg.com/htmx.org@1.3.2"></script> <script src="https://unpkg.com/htmx.org@1.3.3"></script>
``` ```
For added security, you can load the script using [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). For added security, you can load the script using [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).

View File

@ -35,7 +35,7 @@ By removing these arbitrary constraints htmx completes HTML as a
```html ```html
<!-- Load from unpkg --> <!-- Load from unpkg -->
<script src="https://unpkg.com/htmx.org@1.3.2"></script> <script src="https://unpkg.com/htmx.org@1.3.3"></script>
<!-- have a button POST a click via AJAX --> <!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML"> <button hx-post="/clicked" hx-swap="outerHTML">
Click Me Click Me

View File

@ -49,7 +49,8 @@ return (function () {
swappingClass:'htmx-swapping', swappingClass:'htmx-swapping',
allowEval:true, allowEval:true,
attributesToSettle:["class", "style", "width", "height"], attributesToSettle:["class", "style", "width", "height"],
wsReconnectDelay: 'full-jitter' wsReconnectDelay: 'full-jitter',
disableSelector: "[hx-disable], [data-hx-disable]",
}, },
parseInterval:parseInterval, parseInterval:parseInterval,
_:internalEval, _:internalEval,
@ -1355,6 +1356,9 @@ return (function () {
} }
function initNode(elt) { function initNode(elt) {
if (elt.closest && elt.closest(htmx.config.disableSelector)) {
return;
}
var nodeData = getInternalData(elt); var nodeData = getInternalData(elt);
if (!nodeData.initialized) { if (!nodeData.initialized) {
nodeData.initialized = true; nodeData.initialized = true;

View File

@ -0,0 +1,32 @@
describe("security options", function() {
beforeEach(function() {
this.server = makeServer();
clearWorkArea();
});
afterEach(function() {
this.server.restore();
clearWorkArea();
});
it("can disable a single elt", function(){
this.server.respondWith("GET", "/test", "Clicked!");
var btn = make('<button hx-disable hx-get="/test">Initial</button>')
btn.click();
this.server.respond();
btn.innerHTML.should.equal("Initial");
})
it("can disable a parent elt", function(){
this.server.respondWith("GET", "/test", "Clicked!");
var div = make('<div hx-disable><button id="b1" hx-get="/test">Initial</button></div>')
var btn = byId("b1");
btn.click();
this.server.respond();
btn.innerHTML.should.equal("Initial");
})
});

View File

@ -85,6 +85,7 @@
<script src="core/parameters.js"></script> <script src="core/parameters.js"></script>
<script src="core/headers.js"></script> <script src="core/headers.js"></script>
<script src="core/regressions.js"></script> <script src="core/regressions.js"></script>
<script src="core/security.js"></script>
<script src="core/perf.js"></script> <script src="core/perf.js"></script>
<script src="core/validation.js"></script> <script src="core/validation.js"></script>
<script src="core/tokenizer.js"></script> <script src="core/tokenizer.js"></script>