Daemach wrote:
It appears that extend no longer extends objects with more than one
object.  In 1.1.2 I could do:

    this.settings = jQuery.extend({}, this.defaults,
arguments.options, this.userOptionsFromCookie);  // named to
illustrate purpose

Now, only the arguments.options values extend the defaults.  Is this
expected behavior?
Extend in 1.1.2:

jQuery.extend = jQuery.fn.extend = function() {
        // copy reference to target object
        var target = arguments[0], a = 1;

        // extend jQuery itself if only one argument is passed
        if ( arguments.length == 1 ) {
                target = this;
                a = 0;
        }
        var prop;
        while (prop = arguments[a++])
                // Extend the base object
                for ( var i in prop ) target[i] = prop[i];

        // Return the modified object
        return target;
};


Extends in 1.1.3:

jQuery.extend = jQuery.fn.extend = function() {
        // copy reference to target object
        var target = arguments[0], a = 1;

        // extend jQuery itself if only one argument is passed
        if ( arguments.length == 1 ) {
                target = this;
                a = 0;
        }
        var prop;
        while ( (prop = arguments[a++]) != null )
                // Extend the base object
                for ( var i in prop ) target[i] = prop[i];

        // Return the modified object
        return target;
};

Only the check for null was added, that shouldn't change anything for your code.

--
Jörn Zaefferer

http://bassistance.de

Reply via email to