MCPcopy
hub / github.com/dcloudio/mui / actualDisplay

Function actualDisplay

examples/login/libs/easymob-webim-sdk/jquery-1.11.1.js:6007–6023  ·  view source on GitHub ↗
( name, doc )

Source from the content-addressed store, hash-verified

6005 */
6006// Called only from within defaultDisplay
6007function actualDisplay( name, doc ) {
6008 var style,
6009 elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
6010
6011 // getDefaultComputedStyle might be reliably used only on attached element
6012 display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
6013
6014 // Use of this method is a temporary fix (more like optmization) until something better comes along,
6015 // since it was removed from specification and supported only in FF
6016 style.display : jQuery.css( elem[ 0 ], "display" );
6017
6018 // We don't have any data stored on the element,
6019 // so use "detach" method as fast way to get rid of the element
6020 elem.detach();
6021
6022 return display;
6023}
6024
6025/**
6026 * Try to determine the default display value of an element

Callers 1

defaultDisplayFunction · 0.85

Calls 1

jQueryFunction · 0.85

Tested by

no test coverage detected