当我尝试查看converse.js演示时,我得到以下错误
converse.js和Internet Explorer11错误:

更改兼容性设置无法解决此问题。
我还在我的环境中设置了一个converse.js副本,并尝试按照本文的建议清除尾随的逗号
Internet explorer errors: 'Expected identifier' and 'Object expected'
但是,我得到了不同的错误
Internet Explorer 11中的错误-没有尾随逗号

这是我的代码(当通过Chrome或Firefox查看时,它可以工作)。
有没有人能建议我怎么做才能让它在IE11中工作?有可能吗?
<script type="text/javascript">
converse.plugins.add('myplugin', {
initialize: function () {
var _converse = this._converse;
this._converse.api.waitUntil('connected').then(function () {
var chat = _converse.api.chats.open('topic1@pcechlt46.pce.local');
console.log("function SENDING MESSAGE");
var msg = converse.env.$msg({
from: _converse.jid,
to:'topic1@pcechlt46.pce.local',
type:'chat'
}).c('body').t('hello world');
_converse.api.send(msg);
});
}
});
converse.initialize({
bosh_service_url: 'http://pcechlt46.pce.local:7070/http-bind/',
authentication: 'anonymous',
show_controlbox_by_default: true,
auto_login: true,
jid: 'pcechlt46.pce.local',
allow_muc: false,
allow_contact_requests: false,
allow_chat_pending_contact: true,
allow_non_roster_messaging: true,
allow_otr: false,
play_sounds: true,
sounds_path: '/converse/sounds/',
notification_icon: '/converse/logo/conversejs.png',
allow_muc_invitations: false,
show_desktop_notifications: true,
debug: true,
whitelisted_plugins: ['myplugin'],
// Blacklist plugins which aren't included in the build file,
// so that other code cannot register their own plugins under
// those names.
blacklisted_plugins: [
"converse-bookmarks",
"converse-controlbox",
"converse-headline",
"converse-otr",
"converse-register",
"converse-vcard",
]
});
</script>发布于 2017-08-29 06:51:57
只是更新一下。JCBrand (ConverseJS developer)已确认此版本在IE11中不起作用,并将在未来版本中发布修复程序。
https://stackoverflow.com/questions/45891737
复制相似问题