gpt4 book ai didi

javascript - Dojo cometD - 配置不起作用

转载 作者:行者123 更新时间:2023-12-03 12:30:57 25 4
gpt4 key购买 nike

我是 CometD (Dojo) 的新手,正在尝试制作一个简单的脚本。第一个确认会显示,但第二个确认不会显示。即使我使用 loglevel: 'debug' 也没有收到错误消息。所有需要的文件都包含使用 googleapis。

require(['dojox/cometd', 'dojo/domReady!'], function(cometd)
{
confirm("test 1");

cometd.configure({
url: http://localhost:8084/Push/,
logLevel: 'debug'
});

confirm("test 2");

cometd.handshake();
});

最佳答案

Dojo 提供的 CometD 文件完全是空的。坦率地说,我不知道为什么,会向 Dojo 人员询问(另请参阅 https://bugs.dojotoolkit.org/ticket/18063 )。

您所要做的就是按照此处的 CometD 说明进行操作:http://docs.cometd.org/reference/primer.html .

一旦您拥有正确的 CometD 文件,您的脚本就可以正常工作。

关于javascript - Dojo cometD - 配置不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23935146/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com