[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread DBJDBJ
Although I am not github-ing jQuery or its tests , this might help : http://dbj.org/4/test/objlrl.htm Here I also cater for IE, where dom methods are object-s ... This also works on Opera 5 Mini (Symbian) PS: I do not see that Robert solution fails on empty function? aka : function () { }

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread DBJDBJ
http://github.com/jquery/jquery/commit/c2bbcd88335cf6f8df4ac9389ecbae90291377fb contains this version of isObject (changed by me to work as a stand- alone ) : isObject = function( obj ) { if ( Object.prototype.toString.call(obj) !== [object Object] ) { return false; } //own

[jquery-dev] jQuery test page is not working properly

2009-11-10 Thread Minwoo Park
Seems like jQuery test page is NOT working properly (http://jquery.com/ test/) - There was about 204 tests, and now only 82 tests are working. - Major browsers (IE, Firefox, Chrome) is failed for lots of tests. when I open http://view.jquery.com/tags/1.3.2/ , It seems like test directory is

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread Robert Katić
PS: I do not see that Robert solution fails on empty function? aka : function () { } I think no one said that. I said that classes with no methods (prototype with no properties) are not supported by my solution. var Class = function(){}; var obj = new Class(); isObject( obj ) // true!

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
I agree that the current isObject has to be renamed to avoid confusion. But we don't need any isObject using Object.prototype.toString.call anywhere in the code... This could be included in any plugin, where required. On Nov 10, 9:28 pm, DBJDBJ dbj...@gmail.com wrote: All is ok then ?

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
It doesn't seem to be in 1.3.2 There isn't probably much code relying on it out there, since it has always been broken. On Nov 10, 11:10 pm, DBJDBJ dbj...@gmail.com wrote: Probably. But it is certainly not my idea ;) I mean there it is, for last several releases It is maybe that it is

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
By the way, if we use the code of isObjectLiteral only once, it doesn't have to be a function either. The less function call, the better. On Nov 10, 11:19 pm, lrbabe lrb...@gmail.com wrote: It doesn't seem to be in 1.3.2 There isn't probably much code relying on it out there, since it has

[jquery-dev] jQuery.extend(true, ...)

2009-11-10 Thread Robert Katić
Wat a hell is going here? // Recurse if we're merging object values if ( deep copy typeof copy === object !copy.nodeType ) { var clone; if ( src ) { clone = src; } else if ( jQuery.isArray(copy) ) { clone = []; } else if ( jQuery.isObject(copy) ) { clone = {}; } else {

[jquery-dev] Re: Calling callback in $.post $.get on error

2009-11-10 Thread Dave Methvin
$.ajax is already one of the most complex and least consistent methods in jQuery, so if anything I'd like to see it get simpler. Can you expand on this? It'd probably be good to either document or fix the issues you're encountering. I think it's a result of the $.ajax method's very

Re: [jquery-dev] jQuery.extend(true, ...)

2009-11-10 Thread John Resig
If someone wants to pass in a random object to be extended we won't stop them. So yeah, someone could do: jQuery.extend([1,2], [3]) and get [3,2] as a result - not sure why you would want to, though. I can't think of a reason to explicitly prevent this behavior, at least. (On a related note I've

Re: [jquery-dev] Re: Calling callback in $.post $.get on error

2009-11-10 Thread John Resig
I think it's a result of the $.ajax method's very ambitious scope. The behavior can change quite a bit depending on the arguments, and many argument combinations aren't valid. http://docs.jquery.com/Ajax/jQuery.ajax#options Just a few examples: jsonp and cross-domain json/script requests

Re: [jquery-dev] jQuery test page is not working properly

2009-11-10 Thread John Resig
Yeah, that test page is kind of broken right now because it's pulling in a newer version of QUnit (one that doesn't work with the 1.3.2 suite). If you want to run the latest test suite the best way to do that is to pull from the 1.3.2 release zip file:

[jquery-dev] Re: Calling callback in $.post $.get on error

2009-11-10 Thread Dave Methvin
$.get(url, callback).error( onError ) That creates a potential race condition, since the async request is made and may complete before the onError handler is attached. Is that really true? I thought javascript was strictly single threaded... That creates a potential race condition,

[jquery-dev] Re: jQuery.extend(true, ...)

2009-11-10 Thread Robert Katić
I don't get your point. I am talking about what is extended recursively, not what is passed as argument. If you have something like this: var options = { nodes: jQuery(div), num: 4, date: new Date }; jQuery.extend(true, options, { nodes: jQuery(#content), num: new Number(5), date: new