carson
aaae399308
Lets try that again
...
Experimental fix for https://github.com/bigskysoftware/htmx/issues/131
2020-07-04 15:46:25 -07:00
carson
b22b1d104c
Merge remote-tracking branch 'origin/dev' into dev
2020-06-30 10:45:38 -07:00
carson
4f3cf2d889
Move events from <event name>.htmx
(jQuery style) to htmx:<event name>
(zepto style)
...
fixes https://github.com/bigskysoftware/htmx/issues/109
2020-06-30 10:45:30 -07:00
chg20
2fbe230853
Merge pull request #122 from bencroker/patch-8
...
Allowed `hx-push-url` to accept a string
2020-06-28 22:17:24 -07:00
Ben Croker
8ee306d178
Update htmx.js
2020-06-29 07:00:49 +02:00
carson
70d770a1b5
Add support for the hx-vars
attribute, for including dynamically computed values in requests
...
Fixes https://github.com/bigskysoftware/htmx/issues/120
2020-06-28 17:07:39 -07:00
Ben Croker
3dc930dcb4
hx-push-url accepts a string
2020-06-26 15:35:33 +02:00
carson
eb04ab5b3e
add scroll
and view
modifiers to hx-swap
2020-06-23 14:25:56 -07:00
carson
6d2b52ff14
0.0.6 release
2020-06-20 05:48:14 -07:00
carson
276082f2c2
exclude value and id from the settle swap to avoid flicker
2020-06-19 06:29:46 -07:00
carson
74c7395f1f
integrate improvement for extension swapping, back out extension passing through event object, run www and dist
2020-06-17 18:33:41 -07:00
chg20
6c8930028c
Merge pull request #94 from twidi/handle-events-and-content-after-handleSwap-extensions
...
Handle events and content after `handleSwap` in extensions
2020-06-17 18:05:45 -07:00
carson
c1a76c7af9
log error on JSON mis-parse
2020-06-17 15:33:34 -07:00
chg20
025b043918
Merge branch 'dev' into json-parse
2020-06-17 15:28:33 -07:00
carson
b07ed32dc4
selector implementation for processNode
2020-06-17 13:42:18 -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
84200f4599
update hyperscript and docs
2020-06-13 13:17:25 -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
296f354fef
fix throttle and make the trigger spec test actually work
2020-06-11 09:45:42 -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
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
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
carson
86f1334d30
move script evaluation under the AJAX processing so we don't double eval scripts on the initial page load (ugh)
2020-06-08 19:06:42 -07:00
Robert Schroll
1060c9e88a
Avoid throwing errors when parsing malformed JSON
...
Instead, treat it as if no value was present.
2020-06-08 00:55:09 -07:00
acnebs
d01025823e
Rename custom HTTP headers to no longer start with X-
...
This convention is deprecated, as per this RFC from the IETF:
https://tools.ietf.org/html/rfc6648
2020-05-28 01:29:51 +01:00
carson
3d814327af
handle exceptions in embedded script tags gracefully
2020-05-26 17:32:22 -07:00
carson
d144742048
test + test fixes
2020-05-26 16:27:20 -07:00
Ben Croker
188c68667b
Allows for empty verb attribute path
2020-05-26 23:41:04 +02:00
carson
7b7f00baa0
include-vals extension + docs cleanup
2020-05-26 10:19:39 -07:00
carson
146003bd86
proper error loggin
2020-05-26 08:19:46 -07:00
carson
821ae457f0
handle bad extensions gracefully
2020-05-26 08:11:32 -07:00
carson
424826b087
support script tags in returned content
2020-05-26 06:59:03 -07:00
carson
9a4ad77d5d
WebSocket and SSE connection closing on element replacement
2020-05-26 06:34:41 -07:00
carson
0ed71d5ad5
javascript is so terrible
2020-05-25 22:42:24 -07:00
carson
666b4cbaa8
add tests for SSE and standardize syntax with websockets
2020-05-25 21:56:29 -07:00
carson
51697abff6
revert settle attribute swapping so internals work + hx-ws tests (ugh)
2020-05-25 19:46:10 -07:00
carson
7036557cba
oob swapping fixes and firm up the settle step quite a bit
2020-05-25 16:34:19 -07:00
carson
a9868cb966
oob supports various swap styles + docs update
2020-05-25 07:36:14 -07:00
Carson Gross
0d67477584
IE 11 fixes
2020-05-24 23:05:35 -07:00
carson
e419212036
lowercase vibe
2020-05-24 22:40:37 -07:00
carson
430295f217
Merge remote-tracking branch 'origin/dev' into dev
2020-05-24 22:00:40 -07:00
carson
7092576aad
attempt at playing nice with the insanity of javascript loaders
2020-05-24 22:00:33 -07:00
chg20
66c2a10739
Merge pull request #42 from rschroll/error-event
...
Switch afterRequest to standard event from error event if no error
2020-05-24 21:42:53 -07:00
carson
8a6a6f8016
web socket support
2020-05-24 21:41:44 -07:00
carson
3fa0ce52a6
Reworks SSE to use a single, separate attribute.
2020-05-24 19:08:40 -07:00