[]Laya.HttpRequest 没有调用回调方法?

//初始化引擎
Laya.init(1136,640);
var xhr = new Laya.HttpRequest();
xhr.http.timeout = 10000;//设置超时时间;
xhr.once(Event.COMPLETE,this,completeHandler);
xhr.once(Event.ERROR,this,errorHandler);
xhr.on(Event.PROGRESS,this,processHandler);
xhr.send("https://www.baidu.com/","","get","text");
function processHandler(data){
console.log(data);
console.log("1111");
}
function errorHandler(data){
console.log("2222");
}
function completeHandler(e){
console.log("3333");
}
已邀请:

曹晓舟_17707314770

赞同来自:

控制台没有任何输出?请问是怎么回事?

乱起名字

赞同来自:

有啊,没有问题啊,
3333

test.png

 

阿耀

赞同来自:

Event是否在顶部声明了Laya.Event?    如果没有声明,监听事件都需要  Laya.Event.COMPLETE   Laya.Event.ERROR  Laya.Event.PROGRESS

曹晓舟_17707314770

赞同来自:

奇怪,为什么我的不可以? layaIDE 版本号,1.7.19

要回复问题请先

商务合作
商务合作