* The ready event handler and self cleanup method
*/
function completed() {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
+ document.removeEventListener( "DOMContentLoaded", completed );
+ window.removeEventListener( "load", completed );
jQuery.ready();
}
} else {
// Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
+ document.addEventListener( "DOMContentLoaded", completed );
// A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
+ window.addEventListener( "load", completed );
}
}
return readyList.promise( obj );
div.innerHTML = "";
documentElement.appendChild( container );
- var divStyle = window.getComputedStyle( div, null );
+ var divStyle = window.getComputedStyle( div );
pixelPositionVal = divStyle.top !== "1%";
boxSizingReliableVal = divStyle.height === "4px";
pixelMarginRightVal = divStyle.marginRight === "4px";
div.style.width = "1px";
documentElement.appendChild( container );
- ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
+ ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
documentElement.removeChild( container );
div.removeChild( marginDiv );
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
if ( elem.ownerDocument.defaultView.opener ) {
- return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ return elem.ownerDocument.defaultView.getComputedStyle( elem );
}
- return window.getComputedStyle( elem, null );
+ return window.getComputedStyle( elem );
};
});
special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
+ elem.addEventListener( type, eventHandle );
}
}
}
};
jQuery.removeEvent = function( elem, type, handle ) {
+
// This "if" is needed for plain objects
if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
+ elem.removeEventListener( type, handle );
}
};