W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: ECMA TC 39 / W3C HTML and WebApps WG coordination

From: Mark S. Miller <erights@google.com>
Date: Fri, 25 Sep 2009 20:48:07 -0700
Message-ID: <4d2fac900909252048y4ae7df9duc68b48b2cfdec1b1@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Cc: Sam Ruby <rubys@intertwingly.net>, es-discuss <es-discuss@mozilla.org>, HTML WG <public-html@w3.org>, public-webapps@w3.org
On Fri, Sep 25, 2009 at 8:27 PM, Mark S. Miller <erights@google.com> wrote:
> OTOH, if our resolution of the need for array-like generic indexes is
> to allow overloading of [], then perhaps the resolution for new APIs
> is to annotate them somehow, to distinguish them from the
> legacy-namespace-confused-APIs-we-can't-fix, so that, for example,
>
>    storage['toString'] is equivalent to storage.getItem('toString'),
> and neither is considered a property access (other than access to the
> getItem property).
>    storage.toString accesses storage's toString property, and is not
> affected by the alternate getter annotation we'd use instead of the
> above.

I withdraw that alternate suggestion. It would require any code
attempting to access genuine properties of the storage object by
computed name to resort to indirect and inconvenience means, like
using Object.getOwnPropertyDescriptor() and simulating the [[Get]]
algorithm.


-- 
    Cheers,
    --MarkM
Received on Saturday, 26 September 2009 03:48:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:33 GMT