mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 14:44:58 -05:00
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 85577a348a
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user