* Get CSS computed property of the given element * @method * @memberof Popper.Utils * @argument {Eement} element * @argument {String} property
(element, property)
| 3075 | |
| 3076 | |
| 3077 | function getStyleComputedProperty(element, property) { |
| 3078 | if (element.nodeType !== 1) { |
| 3079 | return []; |
| 3080 | } // NOTE: 1 DOM access here |
| 3081 | |
| 3082 | |
| 3083 | var window = element.ownerDocument.defaultView; |
| 3084 | var css = window.getComputedStyle(element, null); |
| 3085 | return property ? css[property] : css; |
| 3086 | } |
| 3087 | /** |
| 3088 | * Returns the parentNode or the host of the element |
| 3089 | * @method |
no outgoing calls
no test coverage detected
searching dependent graphs…