Listen to a socket event from injected script