( name, doc )
| 13 | */ |
| 14 | // Called only from within defaultDisplay |
| 15 | function actualDisplay( name, doc ) { |
| 16 | var style, |
| 17 | elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), |
| 18 | |
| 19 | // getDefaultComputedStyle might be reliably used only on attached element |
| 20 | display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? |
| 21 | |
| 22 | // Use of this method is a temporary fix (more like optimization) until something better comes along, |
| 23 | // since it was removed from specification and supported only in FF |
| 24 | style.display : jQuery.css( elem[ 0 ], "display" ); |
| 25 | |
| 26 | // We don't have any data stored on the element, |
| 27 | // so use "detach" method as fast way to get rid of the element |
| 28 | elem.detach(); |
| 29 | |
| 30 | return display; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Try to determine the default display value of an element |
no test coverage detected