Merge branch 'master' of github.com:jquery/jquery into 1.7/callbacks

Conflicts:
	src/deferred.js
This commit is contained in:
jaubourg 2011-05-09 10:19:12 +02:00
commit d65b27810b
4 changed files with 47 additions and 5 deletions

View file

@ -50,7 +50,7 @@ jQuery.extend({
if ( jQuery.isFunction( fn ) ) {
deferred[ handler ](function() {
returned = fn.apply( this, arguments );
if ( jQuery.isFunction( returned.promise ) ) {
if ( returned && jQuery.isFunction( returned.promise ) ) {
returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.ping );
} else {
newDefer[ action ]( returned );

View file

@ -3,6 +3,7 @@
jQuery.support = (function() {
var div = document.createElement( "div" ),
documentElement = document.documentElement,
all,
a,
select,
@ -150,7 +151,7 @@ jQuery.support = (function() {
body.style[ i ] = bodyStyle[ i ];
}
body.appendChild( div );
document.documentElement.appendChild( body );
documentElement.insertBefore( body, documentElement.firstChild );
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
@ -210,7 +211,7 @@ jQuery.support = (function() {
// Remove the body element we added
body.innerHTML = "";
document.documentElement.removeChild( body );
documentElement.removeChild( body );
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/