MCPcopy Index your code
hub / github.com/TruthHun/BookStack / curCSS

Function curCSS

static/wangEditor/js/lib/jquery-2.2.1.js:5789–5836  ·  view source on GitHub ↗
( elem, name, computed )

Source from the content-addressed store, hash-verified

5787
5788
5789function curCSS( elem, name, computed ) {
5790 var width, minWidth, maxWidth, ret,
5791 style = elem.style;
5792
5793 computed = computed || getStyles( elem );
5794 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
5795
5796 // Support: Opera 12.1x only
5797 // Fall back to style even without computed
5798 // computed is undefined for elems on document fragments
5799 if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
5800 ret = jQuery.style( elem, name );
5801 }
5802
5803 // Support: IE9
5804 // getPropertyValue is only needed for .css('filter') (#12537)
5805 if ( computed ) {
5806
5807 // A tribute to the "awesome hack by Dean Edwards"
5808 // Android Browser returns percentage for some values,
5809 // but width seems to be reliably pixels.
5810 // This is against the CSSOM draft spec:
5811 // http://dev.w3.org/csswg/cssom/#resolved-values
5812 if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
5813
5814 // Remember the original values
5815 width = style.width;
5816 minWidth = style.minWidth;
5817 maxWidth = style.maxWidth;
5818
5819 // Put in the new values to get a computed value out
5820 style.minWidth = style.maxWidth = style.width = ret;
5821 ret = computed.width;
5822
5823 // Revert the changed values
5824 style.width = width;
5825 style.minWidth = minWidth;
5826 style.maxWidth = maxWidth;
5827 }
5828 }
5829
5830 return ret !== undefined ?
5831
5832 // Support: IE9-11+
5833 // IE returns zIndex value as an integer.
5834 ret + "" :
5835 ret;
5836}
5837
5838
5839function addGetHookIf( conditionFn, hookFn ) {

Callers 4

getWidthOrHeightFunction · 0.85
jquery-2.2.1.jsFile · 0.85
getWidthOrHeightFunction · 0.85
jquery.jsFile · 0.85

Calls 1

getStylesFunction · 0.85

Tested by

no test coverage detected