MCPcopy
hub / github.com/OscarGodson/EpicEditor / _getStyle

Function _getStyle

src/editor.js:41–51  ·  view source on GitHub ↗

* Returns a DOM objects computed style * @param {object} el The element you want to get the style from * @param {string} styleProp The property you want to get from the element * @returns {string} Returns a string of the value. If property is not set it will return a blank string

(el, styleProp)

Source from the content-addressed store, hash-verified

39 * @returns {string} Returns a string of the value. If property is not set it will return a blank string
40 */
41 function _getStyle(el, styleProp) {
42 var x = el
43 , y = null;
44 if (window.getComputedStyle) {
45 y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
46 }
47 else if (x.currentStyle) {
48 y = x.currentStyle[styleProp];
49 }
50 return y;
51 }
52
53 /**
54 * Saves the current style state for the styles requested, then applies styles

Callers 4

_saveStyleStateFunction · 0.70
_outerWidthFunction · 0.70
_outerHeightFunction · 0.70
editor.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected