Hi there,
When using JQuery, extending an object that has an overridden toString() function causes an "Operation is not supported" error in Firefox. However in Chrome it works fine. Is this a bug in JQuery or am I doing something wrong in the below code snippet?
var foo = function () {
var that = this;
that.toString = function () { return "foobar" };
return that;
}();
var foo2 = function () {
var that = this;
that = $.extend(true, {}, foo); // copy = options[ name ]; = "Operation is not supported" in Firefox 3.6.8
return that;
} ();
alert(foo.toString()); //"foobar" in Chrome
alert(foo2.toString()); //"foobar" in Chrome
JQuery version 1.4.2
Many thanks,
Godders