MCPcopy Index your code
hub / github.com/documentcloud/visualsearch / defaultDisplay

Function defaultDisplay

build-min/dependencies.js:382–384  ·  view source on GitHub ↗
(nodeName)

Source from the content-addressed store, hash-verified

380return this;}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get());}
381return this.pushStack(ret);};});var iframe,elemdisplay={};function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle?window.getDefaultComputedStyle(elem[0]).display:jQuery.css(elem[0],"display");elem.detach();return display;}
382function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);doc=(iframe[0].contentWindow||iframe[0].contentDocument).document;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach();}
383elemdisplay[nodeName]=display;}
384return display;}
385(function(){var a,shrinkWrapBlocksVal,div=document.createElement("div"),divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;"+"display:block;padding:0;margin:0;border:0";div.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";a=div.getElementsByTagName("a")[0];a.style.cssText="float:left;opacity:.5";support.opacity=/^0.5/.test(a.style.opacity);support.cssFloat=!!a.style.cssFloat;div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";a=div=null;support.shrinkWrapBlocks=function(){var body,container,div,containerStyles;if(shrinkWrapBlocksVal==null){body=document.getElementsByTagName("body")[0];if(!body){return;}
386containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";container=document.createElement("div");div=document.createElement("div");body.appendChild(container).appendChild(div);shrinkWrapBlocksVal=false;if(typeof div.style.zoom!==strundefined){div.style.cssText=divReset+";width:1px;padding:1px;zoom:1";div.innerHTML="<div></div>";div.firstChild.style.width="5px";shrinkWrapBlocksVal=div.offsetWidth!==3;}
387body.removeChild(container);body=container=div=null;}

Callers 2

showHideFunction · 0.85
defaultPrefilterFunction · 0.85

Calls 2

actualDisplayFunction · 0.85
jQueryFunction · 0.85

Tested by

no test coverage detected