Add promises to the widget framework.

Parallel to @jasongrout 's solution (human race condition).
`new Error`, not `Error`, I think.