You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I've been working on a tool to identify instances of events registered to the wrong object in uses of some JavaScript event-driven APIs, as part of a research project.
The tool flagged line 84 in static/js/front.js, on the registration of the “connection” event.
The reason I believe this is an error is as follows (from looking at the socket.io-client API documentation, particularly https://socket.io/docs/client-api/#Socket):
Variable s refers to an object of type socket.io-client.Socket, as initialized by a call to new io.Socket on line 78. “connection” is an event on the server, and not on the Socket itself.
The Socket has an event "connect", so my guess is that the code here should instead be "s.on(connect, ..."
Thanks!
The text was updated successfully, but these errors were encountered:
Hi all, I've been working on a tool to identify instances of events registered to the wrong object in uses of some JavaScript event-driven APIs, as part of a research project.
The tool flagged line 84 in static/js/front.js, on the registration of the “connection” event.
The reason I believe this is an error is as follows (from looking at the socket.io-client API documentation, particularly https://socket.io/docs/client-api/#Socket):
Variable s refers to an object of type socket.io-client.Socket, as initialized by a call to new io.Socket on line 78. “connection” is an event on the server, and not on the Socket itself.
The Socket has an event "connect", so my guess is that the code here should instead be "s.on(connect, ..."
Thanks!
The text was updated successfully, but these errors were encountered: