MCPcopy Index your code
hub / github.com/prototypejs/prototype / getRawStyle

Function getRawStyle

src/prototype/dom/layout.js:16–29  ·  view source on GitHub ↗
(element, style)

Source from the content-addressed store, hash-verified

14 //
15 // Camel-cased property names only.
16 function getRawStyle(element, style) {
17 element = $(element);
18
19 // Try inline styles first.
20 var value = element.style[style];
21 if (!value || value === 'auto') {
22 // Reluctantly retrieve the computed style.
23 var css = document.defaultView.getComputedStyle(element, null);
24 value = css ? css[style] : null;
25 }
26
27 if (style === 'opacity') return value ? parseFloat(value) : 1.0;
28 return value === 'auto' ? null : value;
29 }
30
31 function getRawStyle_IE(element, style) {
32 // Try inline styles first.

Callers 2

getPixelValueFunction · 0.85
layout.jsFile · 0.85

Calls 1

$Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…