mario-goulart / awful

awful provides an application and an extension to ease the development of web-based applications in CHICKEN Scheme
http://wiki.call-cc.org/egg/awful
Other
75 stars 6 forks source link

ajax: allow using success with target/update-targets #7

Closed gahr closed 1 year ago

gahr commented 1 year ago

The success, target, and update-targets features of the ajax function decide what needs to be done with a response from an ajax request. The update-targets feature, in particular, in addition to conveying the semantics of what it does much better than the one-liner it injects, it also arranges for the response to be provided as a JSON object.

However, success and the target/update-targets features are currently mutually exclusive.

This PR proposes to allow both features to be used together.

I have decided to run success first, if specified, so in an extreme case one can also return in it and skip the target/update-targets part.

If this PR is accepted, I am willing to update the corresponding docs.

mario-goulart commented 1 year ago

Many thanks! Please note that the wiki documentation is generated from https://github.com/mario-goulart/awful-doc. If you want to update the documentation, please send patches to that repo.