示例代码:
var connection = null;
function onConnect(status) {
im_a_big_error.log('wtf');
// Why it doesn't throw me an error here ??
}
$().ready(function() {
connection = new Strophe.Connection('http://localhost:8080/http-bind');
connection.connect('admin@localhost', 'admin', onConnect);
});
它不会在我的 Chrome 控制台中引发错误。
你有解决这个问题的想法吗?