twitter/typeahead.js — pull request #399 by jackzestia (2013-08-15 10:10:26+00:00)
Title: Allow overriding of ajax handler with custom objects (defaults to $.ajax)

In some settings, such as when a page is embedded within an iframe on another domain, a standard AJAX request isn't desirable as it could be blocked for breaking Same Origin Policy. This allows the user to override `remote.ajaxHandler` with their own handler which will 'do the right thing'.

This was written for an application which runs within a [Google Contextual Gadget](https://developers.google.com/gmail/contextual_gadgets), where cross-domain AJAX is blocked but a wrapper for proxying through Google is provided