handle.js revision 78d3c37c02e77731a25f370f9fac264ef51f01a9
/**
* Return value from all subscribe operations
* @class EventHandle
* @constructor
* @param {CustomEvent} evt the custom event.
* @param {Subscriber} sub the subscriber.
*/
/**
* The custom event
* @type CustomEvent
*/
/**
* The subscriber object
* @type Subscriber
*/
};
Y.EventHandle.prototype = {
batch: function(f, c) {
f.call(c || this, this);
});
}
},
/**
* Detaches this subscriber
* @method detach
* @return {int} the number of detached listeners
*/
detach: function() {
if (evt) {
// Y.log('EventHandle.detach: ' + this.sub, 'info', 'Event');
}
} else {
detached = 1;
}
}
return detached;
},
/**
* Monitor the event state for the subscribed event. The first parameter
* is what should be monitored, the rest are the normal parameters when
* subscribing to an event.
* @method monitor
* @param what {string} what to monitor ('attach', 'detach', 'publish').
* @return {EventHandle} return value from the monitor event subscription.
*/
}
};