Code cleanup con CodeMaid
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
* @argument {String} property
|
||||
*/
|
||||
export default function getStyleComputedProperty(element, property) {
|
||||
if (element.nodeType !== 1) {
|
||||
return [];
|
||||
}
|
||||
// NOTE: 1 DOM access here
|
||||
const window = element.ownerDocument.defaultView;
|
||||
const css = window.getComputedStyle(element, null);
|
||||
return property ? css[property] : css;
|
||||
}
|
||||
if (element.nodeType !== 1) {
|
||||
return [];
|
||||
}
|
||||
// NOTE: 1 DOM access here
|
||||
const window = element.ownerDocument.defaultView;
|
||||
const css = window.getComputedStyle(element, null);
|
||||
return property ? css[property] : css;
|
||||
}
|
||||
Reference in New Issue
Block a user