datasource-get-min.js revision aa67180a9a369470a5913fbe4a85d0219b6c09b9
YUI.add("datasource-get",function(B){var A=function(){A.superclass.constructor.apply(this,arguments);};B.DataSource.Get=B.extend(A,B.DataSource.Local,{_defRequestFn:function(G){var F=this.get("source"),D=this.get("get"),C=B.guid().replace(/\-/g,"_"),E=this.get("generateRequestCallback");this._last=C;YUI.Env.DataSource.callbacks[C]=B.bind(function(H){delete YUI.Env.DataSource.callbacks[C];var I=this.get("asyncMode")!=="ignoreStaleResponses"||this._last===C;if(I){this.fire("data",B.mix({data:H},G));}else{}},this);F+=G.request+E.call(this,C);D.script(F,{autopurge:true,onFailure:B.bind(function(H){H.error=new Error("Script node data failure");this.fire("data",H);},this,G),onTimeout:B.bind(function(H){H.error=new Error("Script node data timeout");this.fire("data",H);},this,G)});return G.tId;},_generateRequest:function(C){return"&"+this.get("scriptCallbackParam")+"=YUI.Env.DataSource.callbacks."+C;}},{NAME:"dataSourceGet",ATTRS:{get:{value:B.Get,cloneDefaultValue:false},asyncMode:{value:"allowAll"},scriptCallbackParam:{value:"callback"},generateRequestCallback:{value:function(){return this._generateRequest.apply(this,arguments);}}}});YUI.namespace("Env.DataSource.callbacks");},"@VERSION@",{requires:["datasource-local","get"]});