]> source.dussan.org Git - jquery.git/commitdiff
Core:CSS:Event: simplification of native method signatures
authorOleg Gaidarenko <markelog@gmail.com>
Sat, 2 May 2015 17:54:11 +0000 (20:54 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Sun, 3 May 2015 10:59:18 +0000 (13:59 +0300)
* Remove third argument from "addEventListener"

* Remove third argument from "removeEventListener"

* Remove second argument from "getComputedStyle"

Ref gh-2047
Ref 85577a348a72ae765e0d7330b9e82985d23c94b7

src/core/ready.js
src/css/curCSS.js
src/css/support.js
src/event.js

index 10bebf6486eaeefb2060f44900977bf362c0d572..2dfbc9180c2f1221b9a7858ce9a366da633654a9 100644 (file)
@@ -68,8 +68,8 @@ jQuery.extend({
  */
 function detach() {
        if ( document.addEventListener ) {
-               document.removeEventListener( "DOMContentLoaded", completed, false );
-               window.removeEventListener( "load", completed, false );
+               document.removeEventListener( "DOMContentLoaded", completed );
+               window.removeEventListener( "load", completed );
 
        // Support: IE<9
        } else {
@@ -110,10 +110,10 @@ jQuery.ready.promise = function( obj ) {
                // Standards-based browsers support DOMContentLoaded
                } else if ( document.addEventListener ) {
                        // 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 );
 
                // Support: IE<9
                // If IE event model is used
index c1a0d2de15b132f35e8ed90adcadf219f2551564..271e665dbb7e01003dce9d3008214d88f301ad3a 100644 (file)
@@ -16,10 +16,10 @@ if ( window.getComputedStyle ) {
                // 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 );
        };
 
        curCSS = function( elem, name, computed ) {
index ab36274d19e58de442592ec4bbfbad7af1c8679b..17848d5356b26b8c73ca85f1575a1ca099211873 100644 (file)
@@ -107,7 +107,7 @@ define([
 
                // Check for getComputedStyle so that this code is not run in IE<9.
                if ( window.getComputedStyle ) {
-                       divStyle = window.getComputedStyle( div, null );
+                       divStyle = window.getComputedStyle( div );
                        pixelPositionVal = ( divStyle || {} ).top !== "1%";
                        boxSizingReliableVal = ( divStyle || { height: "4px" } ).height === "4px";
                        pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
@@ -128,7 +128,7 @@ define([
                        div.style.width = "1px";
 
                        reliableMarginRightVal =
-                               !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
+                               !parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
 
                        div.removeChild( contents );
                }
index a5b8d597d6f636918d0d955d0be586c2040725df..43d36b270507beb8f7f890059a69edb52718ff2a 100644 (file)
@@ -677,7 +677,7 @@ jQuery.removeEvent = document.removeEventListener ?
 
                // This "if" is needed for plain objects
                if ( elem.removeEventListener ) {
-                       elem.removeEventListener( type, handle, false );
+                       elem.removeEventListener( type, handle );
                }
        } :
        function( elem, type, handle ) {