2011-12-17 00:39:52 +00:00
|
|
|
var cah = {};
|
|
|
|
|
2011-12-22 22:19:59 +00:00
|
|
|
cah.DEBUG = true;
|
2011-12-23 02:48:20 +00:00
|
|
|
cah.nickname = "";
|
2012-01-18 04:36:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Binds a function to a "this object". Result is a new function that will do the right thing across
|
|
|
|
* contexts.
|
|
|
|
*
|
|
|
|
* @param {Object}
|
|
|
|
* selfObj Object for "this" when calling the returned function.
|
|
|
|
* @param {Function}
|
|
|
|
* func Function to call with selfObjc as "this".
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
cah.bind = function(selfObj, func) {
|
|
|
|
return function() {
|
|
|
|
func.apply(selfObj, arguments);
|
|
|
|
};
|
|
|
|
};
|