Objects with toString work in html, append, etc
It might be nice to do something like: Dog = function(){} Dog.prototype.toString = function(){ return "woof"} dog = new Dog() $("#foo").html(dog) This can be solved super easy, I just feel like this would already work if it was meant to.
Fix AJAX methods for autoloading XML under IE6/7 (local filesystem, or content-types ending in +xml)
In jQuery 1.4.1, line 5185: var ct = xhr.getResponseHeader("content-type") || "", xml = type === "xml" || !type && ct.indexOf("xml") >= 0, data = xml ? xhr.responseXML : xhr.responseText; if ( xml && data.documentElement.nodeName === "parsererror" ) { jQuery.error( "parsererror" ); } Under IE7, when running an HTML document locally, and retrieveing an XML resource in the same folder with XMLHttpRequest, the XML is not automatically parsed,
isEmptyObject()
I shall be so bold, to suggest slightly improved isEmptyObject() ... /* currently in jQuery isEmptyObject : function(obj) { for (var name in obj) { return false; } return true; } , */ /* return undefined on any object that is not "object" or "function" also ignore the possible prototype chain */ // slightly improved isEmptyObject : function (object) { if (typeof object !== 'object' && typeof object !== 'function') return ;
jquery ajax async vs html5 script async
Firefox is now supporting the html5 proposed async attribute on scripts, which allows them to execute in a non-blocking fashion. The syntax is <script async=""> ... </script> (Note, not async="true", although async="async" is valid.) Here's how google analytics recommend using their tracking code asynchronously: var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
New bug tracker for jQuery
Maybe this is part of the "14 days of jQuery", in which case feel free to just wink at me. Now that we've got nice new forums, a nice new API browser, the code's resituated in GitHub, and John Resig's talking about crazy new bug-fixing workflows, shouldn't jQuery also have a new bug tracker? That Trac install has been showing its age for quite a while, and something like Lighthouse might be easier to manage from both the bug-submitter and developer standpoints.