mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 14:31:47 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
98f2af9221
11
dist/htmx.js
vendored
11
dist/htmx.js
vendored
@ -1653,8 +1653,15 @@ return (function () {
|
||||
try {
|
||||
if (!triggerEvent(elt, 'htmx:beforeOnLoad', eventDetail)) return;
|
||||
|
||||
handleTrigger(elt, this.getResponseHeader("HX-Trigger"));
|
||||
var pushedUrl = this.getResponseHeader("HX-Push");
|
||||
//AK - FIXED CHROME issue - "refuse to get unsafe header" warning.
|
||||
if (xhr.getAllResponseHeaders().indexOf("HX-Trigger") >= 0) {
|
||||
handleTrigger(elt, this.getResponseHeader("HX-Trigger"));
|
||||
}
|
||||
|
||||
if (xhr.getAllResponseHeaders().indexOf("HX-Push") >= 0) {
|
||||
var pushedUrl = this.getResponseHeader("HX-Push");
|
||||
}
|
||||
//AK - FIXED CHROME issue - "refuse to get unsafe header" warning. \\
|
||||
|
||||
var shouldSaveHistory = shouldPush(elt) || pushedUrl;
|
||||
|
||||
|
69
package-lock.json
generated
69
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "htmx.org",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.8",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -162,15 +162,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-syntaxhighlight/-/eleventy-plugin-syntaxhighlight-3.0.1.tgz",
|
||||
"integrity": "sha512-+cXc5oyFagCat+JgIh+4cI1otQMVYSsXjxj2/8J78I+p6ICvCfObzvi7PTXvDPbwXOQP8RkcB4DYOP+MKkcPAw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prismjs": "^1.17.1"
|
||||
}
|
||||
},
|
||||
"@gulp-sourcemaps/identity-map": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz",
|
||||
@ -2136,18 +2127,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"clipboard": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz",
|
||||
"integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"good-listener": "^1.2.2",
|
||||
"select": "^1.1.2",
|
||||
"tiny-emitter": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"cliui": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
|
||||
@ -2636,13 +2615,6 @@
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
|
||||
"dev": true
|
||||
},
|
||||
"delegate": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
||||
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
@ -3730,16 +3702,6 @@
|
||||
"minimatch": "~3.0.2"
|
||||
}
|
||||
},
|
||||
"good-listener": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
||||
"integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"delegate": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
|
||||
@ -4978,9 +4940,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.debounce": {
|
||||
@ -6507,15 +6469,6 @@
|
||||
"parse-ms": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"prismjs": {
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz",
|
||||
"integrity": "sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"clipboard": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
@ -7282,13 +7235,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
||||
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
@ -8275,13 +8221,6 @@
|
||||
"next-tick": "1"
|
||||
}
|
||||
},
|
||||
"tiny-emitter": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"to-absolute-glob": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
|
||||
|
11
src/htmx.js
11
src/htmx.js
@ -1653,8 +1653,15 @@ return (function () {
|
||||
try {
|
||||
if (!triggerEvent(elt, 'htmx:beforeOnLoad', eventDetail)) return;
|
||||
|
||||
handleTrigger(elt, this.getResponseHeader("HX-Trigger"));
|
||||
var pushedUrl = this.getResponseHeader("HX-Push");
|
||||
//AK - FIXED CHROME issue - "refuse to get unsafe header" warning.
|
||||
if (xhr.getAllResponseHeaders().indexOf("HX-Trigger") >= 0) {
|
||||
handleTrigger(elt, this.getResponseHeader("HX-Trigger"));
|
||||
}
|
||||
|
||||
if (xhr.getAllResponseHeaders().indexOf("HX-Push") >= 0) {
|
||||
var pushedUrl = this.getResponseHeader("HX-Push");
|
||||
}
|
||||
//AK - FIXED CHROME issue - "refuse to get unsafe header" warning. \\
|
||||
|
||||
var shouldSaveHistory = shouldPush(elt) || pushedUrl;
|
||||
|
||||
|
10
www/docs.md
10
www/docs.md
@ -303,7 +303,7 @@ with any of the following values:
|
||||
| `beforebegin` | prepends the content before the target in the targets parent element
|
||||
| `beforeend` | appends the content after the last child inside the target
|
||||
| `afterend` | appends the content after the target in the targets parent element
|
||||
| `none` | does not append content from respons (out of band items will still be processed)
|
||||
| `none` | does not append content from response (out of band items will still be processed)
|
||||
|
||||
#### <a name="oob_swaps"></a>[Out of Band Swaps](#oob_swaps)
|
||||
|
||||
@ -371,7 +371,7 @@ htmx for [progressive enhancement](https://en.wikipedia.org/wiki/Progressive_enh
|
||||
|
||||
Htmx has experimental support for declarative use of both
|
||||
[WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications)
|
||||
and [Server Sent Events]((https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)).
|
||||
and [Server Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
|
||||
|
||||
These features are under active development, so please let us know if you are willing to experiment with them.
|
||||
|
||||
@ -492,11 +492,11 @@ The order of operations in a htmx request are:
|
||||
* The `htmx-request` class is applied to the appropriate elements
|
||||
* The request is then issued asynchronously via AJAX
|
||||
* Upon getting a response the target element is marked with the `htmx-swapping` class
|
||||
* An optional swap delay is applied (see the [hx-swap-delay](/attributes/hx-swap-delay) attribute)
|
||||
* An optional swap delay is applied (see the [hx-swap](/attributes/hx-swap) attribute)
|
||||
* The actual content swap is done
|
||||
* the `htmx-swapping` class is removed from the target
|
||||
* the `htmx-settling` class is applied to the target
|
||||
* A settle delay is done (default: 100ms)
|
||||
* A settle delay is done (default: 100ms)
|
||||
* The DOM is settled
|
||||
* the `htmx-settling` class is removed from the target
|
||||
|
||||
@ -542,7 +542,7 @@ Htmx has an extensive events mechanism, which doubles as the logging system.
|
||||
If you want to register for a given htmx event you can use the following javascript:
|
||||
|
||||
```javascript
|
||||
htmx.on("htmx.load", function(evt) {
|
||||
htmx.on("htmx:load", function(evt) {
|
||||
myJavascriptLib.init(evt.details.elt);
|
||||
});
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user