I wrote a small plugin to handle text-to-input-to-text fields for on-the-fly editing, and it includes arguments that allow a user to run functions at different intervals of the process.
I want the user to be able to click the "actuator" (the element that controls the process), and choose to have an intervening function run after the button is clicked (Function A) and another to run after the field has been turned back into standard text (Function B).
The assumption is that Function A will generally contain some sort of asynchronous call. How do I make it so that Function B is forced to run after Function A completes? I'm trying to avoid situations where certain values have to be passed to "flag" a function as ready.