MCPcopy Index your code
hub / github.com/caike/jQuery-Simple-Timer / defaultDisplay

Function defaultDisplay

examples/bundle.js:6718–6748  ·  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

6716 * @param {String} nodeName
6717 */
6718function defaultDisplay( nodeName ) {
6719 var doc = document,
6720 display = elemdisplay[ nodeName ];
6721
6722 if ( !display ) {
6723 display = actualDisplay( nodeName, doc );
6724
6725 // If the simple way fails, read from inside an iframe
6726 if ( display === "none" || !display ) {
6727
6728 // Use the already-created iframe if possible
6729 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
6730 .appendTo( doc.documentElement );
6731
6732 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
6733 doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
6734
6735 // Support: IE
6736 doc.write();
6737 doc.close();
6738
6739 display = actualDisplay( nodeName, doc );
6740 iframe.detach();
6741 }
6742
6743 // Store the correct default display
6744 elemdisplay[ nodeName ] = display;
6745 }
6746
6747 return display;
6748}
6749var rmargin = ( /^margin/ );
6750
6751var 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