diff options
author | Nazar Mokrynskyi <nazar@mokrynskyi.com> | 2014-09-01 23:13:46 +0200 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2014-09-02 23:34:48 +0400 |
commit | 274feb53cc9a99633dfac785d8b3b837d192c43c (patch) | |
tree | 24aab5af2b78cce00a6f8a6f927e53f2cb5faac0 /src/css | |
parent | 075da3091cda170bd8cd5ce47bad1c5b14760232 (diff) | |
download | jquery-274feb53cc9a99633dfac785d8b3b837d192c43c.tar.gz jquery-274feb53cc9a99633dfac785d8b3b837d192c43c.zip |
CSS: Remove use of getDefaultComputedStyle
Remove optimization to make jQuery compatible with Google's Polymer project
Closes gh-1647
Fixes #15227
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/defaultDisplay.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/css/defaultDisplay.js b/src/css/defaultDisplay.js index 0090ca644..42e436a84 100644 --- a/src/css/defaultDisplay.js +++ b/src/css/defaultDisplay.js @@ -13,19 +13,9 @@ var iframe, */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && - ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) - // until something better comes along, - // since it was removed from specification and supported only in FF - style.display : - - jQuery.css( elem[ 0 ], "display" ); + display = jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element |