jQuery.extend in 1.2.6
jQuery.extend in 1.2.6
Hi all, Sorry I have been quiet for awhile (or probably that's a good
thing ;)) but I'm trying to update a project I've been working on to
use jQuery 1.2.6. One function I use heavily is .extend and after
revision 5599 it appears to cause infinite recursion (or at least 'too
much recursion') in at least firefox. Because I havent seen an out
puring of similar issues I'd venture I was somehow implicitly relying
on the old behavior and didnt realize it. I've tried following
through in firebug but its very ellusive.
Here's how I'm using and maybe you can tell me I'm a doo-doo:
Foo$Class = {
constructor: function(options){
jQuery.extend(this, Foo$Class);
jQuery.extend(true, this, options);
},
someMethod:function(){}
//and so on
};Foo = Foo$Class.constructor;
Bar$Class = {
constructor: function(options){
jQuery.extend(true, this, new Foo(options));
jQuery.extend(this, Bar$Class);
jQuery.extend(true, this, options);
},
anotherMethod: function(){}
//and so on
};Bar = Bar$Class.constructor;
What I'm I missing? How can this pattern still cause infinite
recursion with 'extend'? Or is there likely another issue under the
covers?
Thanks
Thatcher