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

Function getContentWidth

src/prototype/dom/layout.js:47–56  ·  view source on GitHub ↗
(element, context)

Source from the content-addressed store, hash-verified

45 // But this means it doesn't handle edge cases. Use it when you know the
46 // element in question is visible and will give accurate measurements.
47 function getContentWidth(element, context) {
48 var boxWidth = element.offsetWidth;
49
50 var bl = getPixelValue(element, 'borderLeftWidth', context) || 0;
51 var br = getPixelValue(element, 'borderRightWidth', context) || 0;
52 var pl = getPixelValue(element, 'paddingLeft', context) || 0;
53 var pr = getPixelValue(element, 'paddingRight', context) || 0;
54
55 return boxWidth - bl - br - pl - pr;
56 }
57
58 if (!Object.isUndefined(document.documentElement.currentStyle) && !Prototype.Browser.Opera) {
59 getRawStyle = getRawStyle_IE;

Callers 1

layout.jsFile · 0.85

Calls 1

getPixelValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…