X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=4949d6bf4e2a9de52eb0ca2683125e9be9433861;hb=c90a1cb61b41a5686bc3764f144a156e734ed459;hp=5da31e6a622f827ceac006da786a7fe1c8470036;hpb=df6e02a4a7d8da037ebdb812e6b92a067223a6ea;p=jquery.git diff --git a/src/core.js b/src/core.js index 5da31e6..4949d6b 100644 --- a/src/core.js +++ b/src/core.js @@ -315,7 +315,7 @@ jQuery.extend({ }, isObjectLiteral: function( obj ) { - if ( toString.call(obj) !== "[object Object]" ) { + if ( toString.call(obj) !== "[object Object]" || typeof obj.nodeType === "number" ) { return false; } @@ -484,13 +484,14 @@ jQuery.extend({ return ret; }, - map: function( elems, callback ) { + // arg is for internal usage only + map: function( elems, callback, arg ) { var ret = [], value; // Go through the array, translating each of the items to their // new value (or values). for ( var i = 0, length = elems.length; i < length; i++ ) { - value = callback( elems[ i ], i ); + value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value;