- From: Rick Waldron <waldron.rick@gmail.com>
- Date: Tue, 8 Apr 2014 14:51:41 -0400
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: Dean Edwards <dean.edwards@gmail.com>, Travis Leithead <travis.leithead@microsoft.com>, Eric Devine <devineej@gmail.com>, "public-html@w3.org" <public-html@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
- Message-ID: <CAHfnhfqRUXv1_NyHp7eE=GKoCKf8MG+uRLkNx5wcr9H7PCbdiw@mail.gmail.com>
On Tue, Apr 8, 2014 at 2:35 PM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Tue, Apr 8, 2014 at 11:32 AM, Rick Waldron <waldron.rick@gmail.com> > wrote: > > class Elements extends Array { > > ... > > > > push(...elems) { > > // not necessarily instanceof, but some kind of check that's similar: > > if (!elems.every(elem => elem instanceof Element)) { > > throw some exception > > } > > super(...elems); > > } > > ... > > } > > How does this deal with arr[0] = string? > I don't immediately have an answer for that question ;) Rick
Received on Tuesday, 8 April 2014 18:52:30 UTC