import {Injectable} from 'angular2/angular2'; import {global} from 'angular2/src/facade/lang'; let _nextRequestId = 0; export const JSONP_HOME = '__ng_jsonp__'; var _jsonpConnections = null; function _getJsonpConnections(): {[key: string]: any} { if (_jsonpConnections === null) { _jsonpConnections = global[JSONP_HOME] = {}; } return _jsonpConnections; } // Make sure not to evaluate this in a non-browser environment! @Injectable() export class BrowserJsonp { // Construct a