587 Commits

Author SHA1 Message Date
chg20
d123741827
Merge pull request #85 from rschroll/json-parse
Avoid throwing errors when parsing malformed JSON
2020-06-17 15:29:17 -07:00
chg20
025b043918
Merge branch 'dev' into json-parse 2020-06-17 15:28:33 -07:00
carson
f9463686e0 switch to contain for safari 2020-06-17 15:15:17 -07:00
carson
3fa9523e8e release prep 2020-06-17 15:03:24 -07:00
carson
76a1d5c5a4 fix remove-me extension tests 2020-06-17 15:02:32 -07:00
carson
6083a2ea74 remove bad console logs 2020-06-17 14:58:38 -07:00
carson
f79d978c09 Merge remote-tracking branch 'origin/perf_improvement' into perf_improvement 2020-06-17 13:54:48 -07:00
carson
5c8b47deb3 update perf to reasonable numbers 2020-06-17 13:54:43 -07:00
carson
05229609ac dist 2020-06-17 13:54:29 -07:00
carson
a9298cfe1a dist 2020-06-17 13:54:05 -07:00
carson
b07ed32dc4 selector implementation for processNode 2020-06-17 13:42:18 -07:00
carson
b6f1c834cf include perf tests 2020-06-17 12:30:52 -07:00
carson
19b933449b catch empty IDs in attribute swap, fixes https://github.com/bigskysoftware/htmx/issues/101 2020-06-16 19:20:23 -07:00
carson
efd3ab85f0 regression for https://github.com/bigskysoftware/htmx/issues/101 2020-06-16 16:46:19 -07:00
carson
504bd34ee4 fix tests, hyperscript is so awesome 2020-06-15 18:28:14 -07:00
carson
d2f30ced11 formatting 2020-06-15 18:26:18 -07:00
carson
f76086aa53 Merge remote-tracking branch 'origin/dev' into dev 2020-06-15 18:25:38 -07:00
carson
d3f0fa36d3 Merge branch 'master' into dev 2020-06-15 18:25:31 -07:00
chg20
64f263f778
Merge pull request #82 from 36864/dev
Add an extension to include the commonly-used X-Requested-With header
2020-06-15 18:25:07 -07:00
carson
8933030b52 Merge remote-tracking branch 'origin/master' 2020-06-15 12:12:15 -07:00
carson
b1902221d7 include contents in reference section 2020-06-15 12:12:08 -07:00
36864
1620dd7ba3 Add extension to extensions.md 2020-06-15 10:56:36 +01:00
carson
4bc6d532c6 move section to end 2020-06-13 20:45:33 -07:00
carson
17c3f74e0c X-IC-Redirect implementation 2020-06-13 20:44:25 -07:00
carson
84200f4599 update hyperscript and docs 2020-06-13 13:17:25 -07:00
carson
06dc449e91 fix up docs 2020-06-12 16:14:39 -07:00
carson
008ca2958a fix up docs 2020-06-12 16:05:06 -07:00
carson
dd89f21e26 some rough docs for hyperscript 2020-06-12 15:55:15 -07:00
carson
0ac641b63f remove the hx-error-url attribute in favor of hyperscript
add basic hyperscript compatibility testing
2020-06-12 13:42:55 -07:00
Stephane Angel (Twidi)
0b9448e727
Extension.handleSwap: handle new content
Before this commit, the content that were swapped by an extension via
`handleSwap` was not handled by htmx: elemtents with `hx-` attributes,
scripts, no `load.htmx` event...

With this commit, if the `handleSwap` command returns an array of newly
added elements (only the first level), then they will be handled by htmx
like it's done for internal swap.

To not break existing extensions, `handleSwap` can still return `true`
to tell that the swap was handled, assuming than there is no new
elements to handle.

A new test was added with a button that, when clicked, loads a text and
a span with `hx-trigger=load`, both handled by an extension. This commit
allows this span to be loaded.

The return of the `morphdom-swap` extension was updated to return the
target element, even if unchanged, to let htmx check in the maybe new
content that there is something new to handle. This is tested in a new
test.
2020-06-12 02:08:05 +02:00
Stephane Angel (Twidi)
86febd3efc
Extension.handleSwap: trigger events for extensions defined on parents
If an element is replaced by an extension in `handleSwap`, the events
(`afterSwap.htmx` and `afterSettle.htmx`) were not received by the
`onLoad` method of extensions defined on parents of the target, because
theses extensions were retrieved after the replacement, and so it was
not possible to get through the parents, the target not being in the dom
anymore.

This commits loads the extensions for the target and save them in
`eventDetail` before doing the swap, so they are accessible in
`triggerEvent`, and passed to `withExtensions` that use this list if
passed (else load them).

A new test is added that fails without the updates in `htmx.js`.
2020-06-12 01:20:13 +02:00
carson
7a0010f43c update dist 2020-06-11 13:05:09 -07:00
carson
c1c9ce5a93 Merge branch 'master' into dev 2020-06-11 13:04:25 -07:00
chg20
7f2a93608d
Merge pull request #92 from cscortes/fixup-json-enc
Fixup json enc
2020-06-11 13:02:41 -07:00
Luis Cortes
55a0fb51dd Fixed issue with xhr. 2020-06-11 12:47:33 -06:00
chg20
0e21054fe0
Merge pull request #91 from ssendev/patch-1
fix hx-sse trigger in example
2020-06-11 09:47:17 -07:00
carson
296f354fef fix throttle and make the trigger spec test actually work 2020-06-11 09:45:42 -07:00
cscortes
bc6715fcea
Merge pull request #1 from bigskysoftware/master
Just getting back up to date
2020-06-11 10:03:50 -06:00
ssendev
068161e817
fix hx-sse trigger in example 2020-06-11 17:24:35 +02:00
carson
96c9623a3d test fix 2020-06-11 06:55:50 -07:00
carson
2ac221bdbc try to preserve focus and selection state when active element is replaced
fixes https://github.com/bigskysoftware/htmx/issues/75
2020-06-11 06:53:18 -07:00
carson
1f62541094 support throttle modifier in trigger definition
https://github.com/bigskysoftware/htmx/issues/88
2020-06-11 06:21:49 -07:00
carson
4ef719e63a support hx-swap="none"
fixes https://github.com/bigskysoftware/htmx/issues/89
2020-06-11 06:02:23 -07:00
carson
5e8fbb2956 include redirects file 2020-06-11 05:39:13 -07:00
carson
b345984bee clean up and move essay 2020-06-11 05:30:12 -07:00
carson
a65c37ec4f Include full path w/ variables when pushing a GET
Fixes https://github.com/bigskysoftware/htmx/issues/58
2020-06-10 16:37:03 -07:00
carson
6f14cba2e6 Trigger events on new content, rather than triggering element, since triggering element may have been replaced
fixes https://github.com/bigskysoftware/htmx/issues/79
2020-06-10 16:09:00 -07:00
carson
dbfb100d4a Merge remote-tracking branch 'origin/dev' into dev 2020-06-10 16:02:03 -07:00
carson
2305aed18e Move X-HTTP-Method-Override out to an extension
fixes https://github.com/bigskysoftware/htmx/issues/86
2020-06-10 16:01:56 -07:00
chg20
c75d057fa6
Merge pull request #80 from bencroker/patch-7
Added missing events and ordered alphabetically
2020-06-09 19:48:32 -06:00