JsBaseEngineHelper: Return the result of callbacks

This allows us to cancel e.g. a jQuery request by returning false in the
callback.