W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: [WebIDL] Remove ArrayClass?

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 19 Jul 2014 17:04:45 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, Erik Arvidsson <arv@chromium.org>
Message-ID: <4E389C26-9D71-4ED5-A456-FF106961EA44@adobe.com>

On Jul 19, 2014, at 6:01 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 7/19/14, 9:23 AM, Dirk Schulze wrote:
>> I do not have more information than the bits that you filtered already.
> 
> OK.
> 
> Erik, do you?  This is about the specific issue https://bugs.webkit.org/show_bug.cgi?id=81573#c45 is talking about.
> 
> One other thing: WebKit seems to seems to use NodeList in various places where the spec says to have an HTMLCollection (e.g. getElementsByTagName).  So it's possible it ran into compat issues that other UAs won't ran into, depending on which exact lists got passed into where…

Why was that changed in the first place? DOM 3 still uses NodeList. Since HTMLCollection seems to be a legacy interface from todays point of view, I wonder why WebKit and Blink would even bother to change it. This is probably off-topic though.

Greetings,
Dirk

> 
>> For current WebKit, you just need the part that does not patch V8 from https://bugs.webkit.org/attachment.cgi?id=170983&action=prettypatch.
> 
> Hey, that code looks familiar.  ;)
> 
>> I suppose it is easier to add [ArrayClass] to NodeList.webidl in Gecko.
> 
> Sure.  The hard part here is the compat testing, not the one line of IDL.
> 
>> Maybe this is enough and just needs to be evangelist?
> 
> Enough for what?  I mean, it's possible to write:
> 
>  Array.from(document.querySelectorAll("whatever")).map(someFunc)
> 
> today in Firefox, but no other browser seems to support it so far.
> 
> 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.
> 
> -Boris
Received on Saturday, 19 July 2014 17:05:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC