Skip to content

Commit 274feb5

Browse files
nazar-pcmarkelog
authored andcommitted
CSS: Remove use of getDefaultComputedStyle
Remove optimization to make jQuery compatible with Google's Polymer project Closes gh-1647 Fixes #15227
1 parent 075da30 commit 274feb5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/css/defaultDisplay.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +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 optimization)
24-
// until something better comes along,
25-
// since it was removed from specification and supported only in FF
26-
style.display :
27-
28-
jQuery.css( elem[ 0 ], "display" );
18+
display = jQuery.css( elem[ 0 ], "display" );
2919

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

0 commit comments

Comments
 (0)