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

Re: Non-constructible constructors and Arrays

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 31 Jul 2011 19:56:31 -0400
Message-ID: <4E35EBAF.1080503@mit.edu>
To: public-script-coord@w3.org
On 7/31/11 7:50 PM, Cameron McCormack wrote:
> Here is a proposal (which I haven't thought deeply about yet): any
> interface that supports indexed properties and which does not inherit
> from another interface

As things stand this would include Window (but not HTMLFormElement, 
since that inherits from HTMLElement, right?).

I suspect that having Window inherit from Array.prototype would probably 
not be web-compatible, but I'm willing to be proved wrong...

> It is then incumbent on the API designer to define index setters/creators/deleters
> appropriately such that the mutating Array methods make sense.

We can't really change the meaning of indexed properties on Window, imho.

> Would this work? Is there a problem with sparse Arrays at all?

Depending on the interface, perhaps.

Received on Sunday, 31 July 2011 23:57:01 UTC

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