q471989525 once () method public function once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦听事件响应一次后自动移除。Parameterstype:String — 事件的类型。caller:* — 事件侦听函数的执行域。 listener:Function — 事件侦听函数。 args:Array (default = null) — (可选)事件侦听函数的回调参数。ReturnsEventDispatcher — 此 EventDispatcher 对象。请求发送:var hr = new HttpRequest(); hr.once(Event.COMPLETE, this, http.success,[1,2,3]); hr.send("http://localhost:8082/hu_get",{}, "post","json",null); 回调方法: success:function (e,args) { console.log(e); //此行可以得到响应内容 console.log(args); //此行无法获取自定义参数?}请问如何获取/传递 自定义参数。
Laya_XS hr.once(Event.COMPLETE, this, http.success,[1,2,3]);uccess:function (1,2,3,e) {}这样是争取的参数接收写法!