tag.js
Summary
No overview generated for 'tag.js'
var tagManager = new function()
{
var counter = 1;
var tags = {};
this.setCB = function(obj, methode, args_list)
{
var tag = (counter++).toString();
tags[tag] = {obj: obj, methode: methode, args: args_list ? args_list : []};
if( window.__debug_event_flow__ )
{
tags[tag].time = new Date().getTime();
}
if( window.__profiling__ )
{
window.__times__[0] = new Date().getTime();
}
return tag;
}
this.handleResponse = function(response)
{
var tag = response.getNodeData('tag'), cb = null;
if( tag && ( cb = tags[tag] ) )
{
delete tags[tag];
if( window.__debug_event_flow__ )
{
debug.output('tag: '+( (new Date().getTime())- cb.time ));
}
cb.methode.apply(cb.obj, [response].concat(cb.args));
return true;
}
else
{
return false;
}
}
}
Documentation generated by
JSDoc on Thu Oct 30 18:01:10 2008