W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: TPAC F2F DOM2 Selectors API review

From: Alex Russell <slightlyoff@google.com>
Date: Wed, 31 Oct 2012 02:00:47 +0100
Message-ID: <CANr5HFUA6S8NY7ChU-W97uO56kAX90yOU935dBEB42rwFoe_eA@mail.gmail.com>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
Cc: odinho@opera.com, "Mark S. Miller" <erights@google.com>, Erik Aarvidson <arv@google.com>, Lachlan Hunt <lachlan.hunt@lachy.id.au>, Yehuda Katz <wycats@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Yes, I mean exactly that.
On Oct 30, 2012 4:47 PM, "Allen Wirfs-Brock" <allen@wirfs-brock.com> wrote:

>
> On Oct 30, 2012, at 2:36 AM, Alex Russell wrote:
>
> Hi Everyone,
>
> So today at TPAC there was a brief discussion about Selectors 2 -- and
> good news, everybody! We've settled on "find", "findAll", and "matches"!
>
> The return type is still the issue, however, and I proposed the following
> today:
>
>
>    - We specify the DOM APIs which vend node lists which must be
>    immutable or mutated only by DOM (a.k.a. "live node lists") from existing
>    APIs as either seal()/freeze() instances or as Proxies. That allows the
>    vending APIs to maintain the invariants regardless of what NodeList as a
>    class does
>    - We define NodeList as a constructable class which derives from
>    Array, is mutable by default, etc.
>
> In ES6 terms, do you mean:
>
> class NodeList extends Array {
>     constructor (...args) {
>          super(...args);  //or maybe without ...args if NodeList
> constructor has a different  parameter interpretation
>          // NodeList specific initialization such as  creating a proxy for
> this
>       }
>       //other NodeList specific methods and over-rides
> }
>
> With the assumption that "subclassing" Array and super invoking its
> constructor installs all Array magic such as length property invariants on
> the subclass instance.
>
> Allen
>
>
>
>
>
Received on Wednesday, 31 October 2012 01:01:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC