Maybe this code can be rewritten a more function way:

```js
return elems.some(function(elem) {
    var comp = window.getComputedStyle(elem, null);
    return comp.visibility !== 'hidden' && 
           comp.display !== 'none' && 
           elem.offsetHeight > 0 && 
           elem.offsetWidth > 0;
});
```

(untested, might need to be adapted)