Hi guys,
I was looking through some of my old source code and noticed that I
added a modified Object.extend method.
Apparently the normal for-in loop used in the Object.extend guts
ignores methods named 'toString'.
I fixed this:
/* * * * * * * * * * * * * * * * * * *
*
* Prototype Extensions
*
* * * * * * * * * * * * * * * * * * */
Object.extend = function(destination, source) {
//support null source
var source = source || {};
if(source.toString){
//add support for copying toString()
destination.toString = source.toString;
}
for (var property in source){
destination[property] = source[property];
}
return destination;
};
That's all. 8)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---