Add promises to the widget framework.

Parallel to @jasongrout 's solution (human race condition).
Perhaps the `_maybe_callback` method name can be improved now?