I like this suggestion.  I didn't think I could use such methods on
NodeList, but it's possible using the array prototype methods directly.
Edited the pull request.


On Sat, Mar 23, 2013 at 10:38 AM, Nicolas Perriault <
notifications@github.com> wrote:

> In modules/clientutils.js:
>
> >
> > -                if (el) {
> > +                for(var i = 0; i < elems.length; i++)
>
> Maybe this code can be rewritten a more function way:
>
> 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)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/n1k0/casperjs/pull/432/files#r3501424>
> .
>