Re: [WebIDL] Remove ArrayClass?

On Sat, Jul 19, 2014 at 9:01 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> It's possible to do:
>
>   Array.prototype.slice.
>         call(document.querySelectorAll("whatever")).map(someFunc)
>
> in all browsers, but the first reaction people have when they see that is
> "WAT?".  Can't say I blame them.  With ArrayClass that becomes:
>
>   document.querySelectorAll("whatever").map(someFunc)
>
> which is what people want out of this stuff anyway.

As far as I know, the plan is still to do [ArrayClass] for the results
of el.queryAll(), regardless of whether .qSA() has compat problems.
You just gave basically the entire reason - the existing "slice it
like an array" hack is *total bullshit*, and everyone hates it.

(I add a "function queryAll(sel) { return
Array.prototype.slice.call(document.querySelectorAll(sel)); }" to my
doc any time I'm doing any DOM manipulation, because I hate it so
bad.)

~TJ

Received on Saturday, 19 July 2014 21:47:29 UTC