Pusher-js是Pusherwebservice的JavaScript客户端,可利用Pusher提供的服务实现消息的推送。该源码中包含:websocket-jssockjs-client示例代码:varsocket=newPusher('MY_API_KEY');varmy_channel=socket.subscribe('my-channel');socket.bind('new-comment',function(data){//addcommentintopage});