This "resolves" a timing bug that was ocurring in the CI, where these
tests would run before htmx was loaded (only in the GitHub actions
servers). Not proud of this as a fix but I would like the CI to work
again ASAP.
* Fix submit buttons/inputs handling
* Removed useless concatenation
* Don't initNode links and forms that shouldn't be initialized
* Removed selectors filtering to alleviate PR
* Add @1cg 's addValueToValues function to factor code
* Use formValues variable for clicked button's value including
* Allow extensions to set request bodies for GET and DELETE
Even though the semantics of request bodies for GET and DELETE are
undefined, it is legal to set request bodies for them. By default, GET
and DELETE form parameters should be encoded as URLs. If, however, an
extension defines `encodeParameters`, that should override the default
and set the request bodies for GET and DELETE methods, just like it does
for all the other HTTP methods.
* Don't use URL params by default with DELETE
* Re-enable skipped DELETE test
* Remove reference to DELETE in comment
* Add "useUrlParams" to requestConfig
* Add config.methodsThatUseUrlParams
* Add methodsThatUseUrlParams config tests
* Don't switch to body params based on extension
Update the clearWorkArea function so that it doesn't error if there was
never a work area set up to begin with. This was causing the `npm test`
target to end with an error code.
The package-lock.json update happens on a fresh install with node 15, so
I'm including it here to make sure that the tests passing is
reproducible. I also updated the package.json file to warn you if you're
not running node 15.
New function to turn off the logger after using `logAll()`. I applied to
this to the tests as well so that `logAll()` is only used in the specfic
places where debug output is required. This makes the console output of
the tests dramatically more useful when run from the command line.
* Add support for hx-on:* attribute
* Use shorter XPath selector
* Add support for "hx-on::" shorthand
* Add note about mixing the two forms of `hx-on`
* do not use template parsing for full body response content
* clear polling when reprocessing an element to avoid stacking up poll requests
latter fixes https://github.com/bigskysoftware/htmx/issues/1350
* Normalize URL used as a cache key for history, without breaking IE.
* Update test `boosted element hx-disinherit sanity check` to check that the fully resolved href of the boosted element matches request.detail.requestConfig.path
The `htmx:trigger` event is fired whenever an HTMX AJAX request would
be. Now, `hx-trigger` can also be specified on an element without an
AJAX request, which will simply fire the `htmx:trigger` event on the
action specified by the attribute, and do nothing else.
This pattern allows for specifying client-side actions that don't
require a network request, while remaining within the HTMX control
paradigm.