- From: Mark S. Miller <erights@google.com>
- Date: Fri, 25 Sep 2009 20:48:07 -0700
- 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:49:02 UTC