Skip to content

Commit 49bce47

Browse files
committed
Core:CSS:Event: simplification of native method signatures
* Remove third argument from "addEventListener" * Remove third argument from "removeEventListener" * Remove second argument from "getComputedStyle" Ref gh-2047 Ref 85577a3
1 parent 4632e55 commit 49bce47

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/core/ready.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jQuery.extend({
6868
*/
6969
function detach() {
7070
if ( document.addEventListener ) {
71-
document.removeEventListener( "DOMContentLoaded", completed, false );
72-
window.removeEventListener( "load", completed, false );
71+
document.removeEventListener( "DOMContentLoaded", completed );
72+
window.removeEventListener( "load", completed );
7373

7474
// Support: IE<9
7575
} else {
@@ -110,10 +110,10 @@ jQuery.ready.promise = function( obj ) {
110110
// Standards-based browsers support DOMContentLoaded
111111
} else if ( document.addEventListener ) {
112112
// Use the handy event callback
113-
document.addEventListener( "DOMContentLoaded", completed, false );
113+
document.addEventListener( "DOMContentLoaded", completed );
114114

115115
// A fallback to window.onload, that will always work
116-
window.addEventListener( "load", completed, false );
116+
window.addEventListener( "load", completed );
117117

118118
// Support: IE<9
119119
// If IE event model is used

src/css/curCSS.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ if ( window.getComputedStyle ) {
1616
// IE throws on elements created in popups
1717
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
1818
if ( elem.ownerDocument.defaultView.opener ) {
19-
return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
19+
return elem.ownerDocument.defaultView.getComputedStyle( elem );
2020
}
2121

22-
return window.getComputedStyle( elem, null );
22+
return window.getComputedStyle( elem );
2323
};
2424

2525
curCSS = function( elem, name, computed ) {

src/css/support.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ define([
107107

108108
// Check for getComputedStyle so that this code is not run in IE<9.
109109
if ( window.getComputedStyle ) {
110-
divStyle = window.getComputedStyle( div, null );
110+
divStyle = window.getComputedStyle( div );
111111
pixelPositionVal = ( divStyle || {} ).top !== "1%";
112112
boxSizingReliableVal = ( divStyle || { height: "4px" } ).height === "4px";
113113
pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
@@ -128,7 +128,7 @@ define([
128128
div.style.width = "1px";
129129

130130
reliableMarginRightVal =
131-
!parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
131+
!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
132132

133133
div.removeChild( contents );
134134
}

src/event.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ jQuery.removeEvent = document.removeEventListener ?
677677

678678
// This "if" is needed for plain objects
679679
if ( elem.removeEventListener ) {
680-
elem.removeEventListener( type, handle, false );
680+
elem.removeEventListener( type, handle );
681681
}
682682
} :
683683
function( elem, type, handle ) {

0 commit comments

Comments
 (0)