add support for registering a deferred ajax call