MCPcopy Create free account
hub / github.com/prototypejs/prototype / isDisplayed

Function isDisplayed

src/prototype/dom/layout.js:150–159  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

148
149 // Shortcut for figuring out if an element is `display: none` or not.
150 function isDisplayed(element) {
151 while (element && element.parentNode) {
152 var display = element.getStyle('display');
153 if (display === 'none') {
154 return false;
155 }
156 element = $(element.parentNode);
157 }
158 return true;
159 }
160
161 // In IE6-7, positioned elements often need hasLayout triggered before they
162 // report accurate measurements.

Callers 1

layout.jsFile · 0.70

Calls 1

$Function · 0.85

Tested by

no test coverage detected