MCPcopy
hub / github.com/mongodb/node-mongodb-native / css_defaultDisplay

Function css_defaultDisplay

docs/2.2/js/jquery.js:7266–7295  ·  view source on GitHub ↗
( nodeName )

Source from the content-addressed store, hash-verified

7264
7265// Try to determine the default display value of an element
7266function css_defaultDisplay( nodeName ) {
7267 var doc = document,
7268 display = elemdisplay[ nodeName ];
7269
7270 if ( !display ) {
7271 display = actualDisplay( nodeName, doc );
7272
7273 // If the simple way fails, read from inside an iframe
7274 if ( display === "none" || !display ) {
7275 // Use the already-created iframe if possible
7276 iframe = ( iframe ||
7277 jQuery("<iframe frameborder='0' width='0' height='0'/>")
7278 .css( "cssText", "display:block !important" )
7279 ).appendTo( doc.documentElement );
7280
7281 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
7282 doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
7283 doc.write("<!doctype html><html><body>");
7284 doc.close();
7285
7286 display = actualDisplay( nodeName, doc );
7287 iframe.detach();
7288 }
7289
7290 // Store the correct default display
7291 elemdisplay[ nodeName ] = display;
7292 }
7293
7294 return display;
7295}
7296
7297// Called ONLY from within css_defaultDisplay
7298function actualDisplay( name, doc ) {

Callers 2

showHideFunction · 0.70
defaultPrefilterFunction · 0.70

Calls 4

actualDisplayFunction · 0.70
jQueryFunction · 0.70
writeMethod · 0.65
closeMethod · 0.45

Tested by

no test coverage detected