MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / defaultDisplay

Function defaultDisplay

libs/jquery-3.5.1/jquery-2.2.4.js:5609–5639  ·  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

5607 * @param {String} nodeName
5608 */
5609function defaultDisplay( nodeName ) {
5610 var doc = document,
5611 display = elemdisplay[ nodeName ];
5612
5613 if ( !display ) {
5614 display = actualDisplay( nodeName, doc );
5615
5616 // If the simple way fails, read from inside an iframe
5617 if ( display === "none" || !display ) {
5618
5619 // Use the already-created iframe if possible
5620 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
5621 .appendTo( doc.documentElement );
5622
5623 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
5624 doc = iframe[ 0 ].contentDocument;
5625
5626 // Support: IE
5627 doc.write();
5628 doc.close();
5629
5630 display = actualDisplay( nodeName, doc );
5631 iframe.detach();
5632 }
5633
5634 // Store the correct default display
5635 elemdisplay[ nodeName ] = display;
5636 }
5637
5638 return display;
5639}
5640var rmargin = ( /^margin/ );
5641
5642var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

Callers 2

showHideFunction · 0.70
defaultPrefilterFunction · 0.70

Calls 2

actualDisplayFunction · 0.70
jQueryFunction · 0.70

Tested by

no test coverage detected