Return value from ensure()-callback

Aug 25, 2008 at 9:33 AM
I love the concept of ensure, but want to use it in a scenario like this:

<a href="/app/delete" onclick="return ensure({...}, deleteFunction())">Delete</a>

where the return value from the onclick-method decides whether to activate the link or not. Without ensure this is easy (onclick="return deleteFunction()"), but with ensure it is not so easy, since ensure does not pass the return value from the callback function.

Is this possible to implement, or does the nature of ensure make this impossible?