MCPcopy Index your code
hub / github.com/frank-lam/fullstack-tutorial / defaultDisplay

Function defaultDisplay

notes/docsify/unpkg/gotop/jquery-2.1.0.js:5436–5465  ·  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

5434 * @param {String} nodeName
5435 */
5436function defaultDisplay( nodeName ) {
5437 var doc = document,
5438 display = elemdisplay[ nodeName ];
5439
5440 if ( !display ) {
5441 display = actualDisplay( nodeName, doc );
5442
5443 // If the simple way fails, read from inside an iframe
5444 if ( display === "none" || !display ) {
5445
5446 // Use the already-created iframe if possible
5447 iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
5448
5449 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
5450 doc = iframe[ 0 ].contentDocument;
5451
5452 // Support: IE
5453 doc.write();
5454 doc.close();
5455
5456 display = actualDisplay( nodeName, doc );
5457 iframe.detach();
5458 }
5459
5460 // Store the correct default display
5461 elemdisplay[ nodeName ] = display;
5462 }
5463
5464 return display;
5465}
5466var rmargin = (/^margin/);
5467
5468var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

Callers 2

showHideFunction · 0.85
defaultPrefilterFunction · 0.85

Calls 2

actualDisplayFunction · 0.85
jQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…