1

我想创建使用 Pusher 服务 ( http://pusher.com/ ) 向客户端发送消息的扩展,我收到以下错误消息:端口错误:无法建立连接。接收端不存在。当我在简单的 html 页面上尝试相同的代码时,它可以工作。

Pusher.log = function(message) {
  if (window.console && window.console.log) window.console.log(message);
};

// Flash fallback logging - don't include this in production
WEB_SOCKET_DEBUG = true;

var pusher = new Pusher('key');
var channel = pusher.subscribe('channel');
channel.bind('event', function(data) {
  alert("test");
});

我是否需要更改任何内容才能使其运行?

谢谢。

4

0 回答 0