下载了js客户端,并按照教程写了连接代码,用的是chrom浏览器,出现如下错误

pomelo-client.js:84 Uncaught ReferenceError: EventEmitter is not defined
at pomelo-client.js:84
at pomelo-client.js:238
tt.html:10 Uncaught ReferenceError: pomelo is not defined
at tt.html:10

标签: pomelo 开发求助
aaaa9813 在 1-22 14:38发布 分享到 weibo
1 回复
#1 aaaa9813 1-22 14:42 回复

<!--代码如下-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>unit tst</title>

&lt;script src=&quot;lib/pomelo-client.js&quot;&gt;&lt;/script&gt;

</head>
<body>

<script>

function connect(host, port) {
    pomelo.init({
        host: host,
        port: port,
        log: true
    }, function (data) {
        console.log(&apos;success&apos;);
    });

}

conncet(&quot;192.168.10.209&quot;, 3014);

</script>
</body>
</html>

回到顶部