code: function polling$1(opts) {
    var xhr;
    var xd = false;
    var xs = false;
    var jsonp = false !== opts.jsonp;
  
    if (commonjsGlobal.location) {
      var isSSL = "https:" === location.protocol;
      var port = location.port;
  
      // some user agents have empty `location.port`
      if (!port) {
        port = isSSL ? 443 : 80;
      }
  
      xd = opts.hostname !== location.hostname || port !== opts.port;
      xs = opts.secure !== isSSL;
    }
  
    opts.xdomain = xd;
    opts.xscheme = xs;
    xhr = new xmlhttprequest(opts);
  
    if ("open" in xhr && !opts.forceJSONP) {
      return new pollingXhr(opts);
    } else {
      if (!jsonp) throw new Error("JSONP disabled");
      return new pollingJsonp(opts);
    }
  }
docs: Polling transport polymorphic constructor.
  Decides on xhr vs jsonp based on feature detection.
  
  @api private