Skip to content

Commit 44c9c4f

Browse files
nazar-pcmarkelog
authored andcommitted
CSS: Remove use of getDefaultComputedStyle
Remove optimization to make jQuery compatible with Google's Polymer project Ref 274feb5
1 parent 835e8c4 commit 44c9c4f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/css/defaultDisplay.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,9 @@ var iframe,
1313
*/
1414
// Called only from within defaultDisplay
1515
function actualDisplay( name, doc ) {
16-
var style,
17-
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
16+
var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
1817

19-
// getDefaultComputedStyle might be reliably used only on attached element
20-
display = window.getDefaultComputedStyle &&
21-
( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
22-
23-
// Use of this method is a temporary fix (more like optmization)
24-
// until something better comes along,
25-
// since it was removed from specification and supported only in FF
26-
style.display : jQuery.css( elem[ 0 ], "display" );
18+
display = jQuery.css( elem[ 0 ], "display" );
2719

2820
// We don't have any data stored on the element,
2921
// so use "detach" method as fast way to get rid of the element

0 commit comments

Comments
 (0)