MCPcopy
hub / github.com/apache/caldera / defaultDisplay

Function defaultDisplay

static/jquery/jquery.js:6458–6488  ·  view source on GitHub ↗

* Try to determine the default display value of an element * @param {String} nodeName

( nodeName )

Source from the content-addressed store, hash-verified

6456 * @param {String} nodeName
6457 */
6458function defaultDisplay( nodeName ) {
6459 var doc = document,
6460 display = elemdisplay[ nodeName ];
6461
6462 if ( !display ) {
6463 display = actualDisplay( nodeName, doc );
6464
6465 // If the simple way fails, read from inside an iframe
6466 if ( display === "none" || !display ) {
6467
6468 // Use the already-created iframe if possible
6469 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
6470 .appendTo( doc.documentElement );
6471
6472 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
6473 doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
6474
6475 // Support: IE
6476 doc.write();
6477 doc.close();
6478
6479 display = actualDisplay( nodeName, doc );
6480 iframe.detach();
6481 }
6482
6483 // Store the correct default display
6484 elemdisplay[ nodeName ] = display;
6485 }
6486
6487 return display;
6488}
6489var rmargin = ( /^margin/ );
6490
6491var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

Callers 2

showHideFunction · 0.85
defaultPrefilterFunction · 0.85

Calls 3

actualDisplayFunction · 0.85
jQueryFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected