code: function polling (opts) {
    var xhr
      , xd = false
      , isXProtocol = false;
  
    if (global.location) {
      var isSSL = 'https:' == location.protocol;
      var port = location.port;
  
      // some user agents have empty `location.port`
      if (Number(port) != port) {
        port = isSSL ? 443 : 80;
      }
  
      xd = opts.host != location.hostname || port != opts.port;
      isXProtocol = opts.secure != isSSL;
    }
  
    xhr = util.request(xd);
    /* See #7 at http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx */
    if (isXProtocol && global.XDomainRequest && xhr instanceof global.XDomainRequest) {
      return new JSONP(opts);
    }
  
    if (xhr && !opts.forceJSONP) {
      return new XHR(opts);
    } else {
      return new JSONP(opts);
    }
  }
docs: Polling transport polymorphic constructor.
  Decides on xhr vs jsonp based on feature detection.
  
  @api private