jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Inaccessible path? #217

Open jrschumacher opened 5 years ago

jrschumacher commented 5 years ago

I think this might be an inaccessible path:

https://github.com/jpillora/xdomain/blob/gh-pages/src/lib/socket.js#L129-L131

    if (socket === undefined) {
      //send unsolicited requests to the listening server
      if (!handleSocket) { // <---- its imported from ./slave.js
        return;
      }
      socket = exports.createSocket(id, e.source);
      handleSocket(e.origin, socket);
    }