One Reply to “Yay for querySelectorAll. Boo for StaticNodeList.”

  1. Even stranger is it seems that it was decided that Array was a better idea:

    http://www.mail-archive.com/public-webapi@w3.org/msg00662.html

    Don’t ask me what happened there. I find this frustrating.

    Is there an easy way to convert a StaticNodeList to an Array? The only workaround I’ve found so far is using the generic Array functions, so instead of:

    a.map(…) // a is a StaticNodeList

    you just do:

    Array.prototype.map.call(a, …)

    …and it works.

    Kev

Comments are closed.