7 Commits

Author SHA1 Message Date
Luis Eduardo
27b5bcc438
Improved documentation for htmx:confirm event and examples for implementing sweetalert (#2926)
* Add detail.question and detail.issueRequest(skipConfirmation=false) documentation to htmx:confirm event

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Modify htmx:confirm event documentation
2024-09-25 09:39:28 +02:00
Lloyd Lobo
b176784f31
docs: fix this binding in onClick .then handler with arrow function (#2373)
docs: fix `this` binding in onClick .then handler with arrow fn

 Update the `.then()` handler in the `onClick` attribute to use an arrow function instead of a traditional `function(arg)` expression. 

This fixes the `this` binding within the lexical scope, ensuring that `this` is bound to the `button` instead of the `window` and resolving the issue.

Fixes/Closes issue  #2257
2024-04-25 12:47:21 -04:00
rafkub
cc9d3f063c
Update confirm.md (#2443)
Fix typo - repeated "and the"
2024-04-25 12:33:28 -04:00
Carson Gross
894b4dd3e8 nuke hyperscript (for the most part) 2024-01-09 11:23:15 -07:00
Mia
8d0338ade8
Fix the Django example in www/content/examples/confirm.md (#2062) 2023-11-30 15:57:30 -05:00
matiboy
712ee759f1
Fix confirmed being ignored in htmx:confirm event (#1610)
* Current behavior testing

Testing current library behavior

* Test should remove correct handler

* Add question in htmx:confirm event detail

* Allow skipping window.confirm

* Additional test without hx-confirm value

* Wrap htmx.off in finally

* More correct assertion in case of no calls to confirm

* Remove erroneously added formatting

* Remove erroneously added formatting

* Documentation, fix loop

---------

Co-authored-by: mat <matt@techspace.asia>
2023-10-26 14:43:41 -06:00
Daniel J. Summers
f690d92834 Replace www directory 2023-03-18 11:29:38 -04:00