mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
CSS: Remove use of getDefaultComputedStyle
Remove optimization to make jQuery compatible with Google's Polymer project
Ref 274feb53cc
This commit is contained in:
parent
835e8c4ae3
commit
44c9c4f751
@ -13,17 +13,9 @@ var iframe,
|
|||||||
*/
|
*/
|
||||||
// Called only from within defaultDisplay
|
// Called only from within defaultDisplay
|
||||||
function actualDisplay( name, doc ) {
|
function actualDisplay( name, doc ) {
|
||||||
var style,
|
var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
||||||
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
|
||||||
|
|
||||||
// getDefaultComputedStyle might be reliably used only on attached element
|
display = jQuery.css( elem[ 0 ], "display" );
|
||||||
display = window.getDefaultComputedStyle &&
|
|
||||||
( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
|
|
||||||
|
|
||||||
// Use of this method is a temporary fix (more like optmization)
|
|
||||||
// until something better comes along,
|
|
||||||
// since it was removed from specification and supported only in FF
|
|
||||||
style.display : jQuery.css( elem[ 0 ], "display" );
|
|
||||||
|
|
||||||
// We don't have any data stored on the element,
|
// We don't have any data stored on the element,
|
||||||
// so use "detach" method as fast way to get rid of the element
|
// so use "detach" method as fast way to get rid of the element
|
||||||
|
Loading…
Reference in New Issue
Block a user