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
* 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>