7 Commits

Author SHA1 Message Date
makasaurus
8a7228c02a
adding support for hx-trigger="restore" (#668)
* adding support for hx-trigger="restore"

* switching over to an extension + docs + tests

Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2022-02-04 11:09:18 -07:00
Ben Pate
9e58594af1 Update preload extension
- preloading linked images is now optional
- update manual tests
- update documentation
2021-01-28 14:30:35 -07:00
Ben Pate
8aa4f74745 Change Default Configuration
- allow inheritance
- change default trigger to mousedown
- move configuration event into `preload` attribute
- remove wait option (delay hardcoded to 100ms)
- update manual test cases
2021-01-02 17:55:36 -07:00
Ben Pate
3022030505 Add test cases
Manual test cases for now.
2021-01-01 21:54:49 -07:00
Ben Pate
d928c7ca38 Improved error handling
- Catches rapid mouse movements better
- Better test cases
2020-12-29 22:12:47 -07:00
Ben Pate
294885454b Style updates
- use built-in htmx.parseInterval function instead of custom one
- smarter handling of mouse movement inside complex objects
- more descriptive values in preloadState
- also, semicolons
2020-12-29 20:39:07 -07:00
Ben Pate
d0f19754ad Updates
- Changed API to look for event names and wait durations.
- Changed default triggers to mousedown (0ms wait time)
- Added default wait on mouseover events (100ms)
- Now using htmx.ajax for HX-GET requests.  This makes sure headers match the actual HTTP requestswhen they're made
- Updated manual tests

- More tests and documentation to come
2020-12-29 16:28:35 -07:00