Decoupling [ ] and Property Access and the DOM (Was: Why not NodeList#forEach :\?)
hemanth.hm at gmail.com
Tue Jun 19 09:43:07 PDT 2012
Hoping to see that day soon! :)
On Tue, Jun 19, 2012 at 10:01 PM, Erik Arvidsson
<erik.arvidsson at gmail.com>wrote:
> On Tue, Jun 19, 2012 at 8:37 AM, Allen Wirfs-Brock
> <allen at wirfs-brock.com> wrote:
> > Actual API "design" is probably an orthogonal issue. What the "Object
> Model Reformation" proposal (which is probably better understood by its
> subtitle "Decoupling [ ] and Property Access") does is permit the existing
> having having to resort to host object magic. It supports the general
> principle of: If the DOM needs to do it then it should be doable in pure
> for "indexed access" to have different semantics than "property access".
> The DOM does this today. In an improved DOM API design it will probably
> also be the case. The Object Model Reformation provides a semantic basis
> for designing such improved APIs rather than just making up host object
> I'm a big fan of your proposal but it is unfortunately not sufficient
> to express the current DOM. People do depend on MemberExpression too.
> For example:
> document.forms.bar instead of document.forms['bar']
> frames.foo instead of frames['foo']
> One thing we could do once/if the object model reformation is
> implemented is to rename the current indexed and named properties in
> WebIDL to LegacyIndexed and LegacyNamed and mandate that new
> interfaces only use MemberLookup (square bracket lookup).
> Still, I wonder if we don't need an alternative way to implement
> indexed and named attributes from WebIDL to compatible with the web as
> is its.
> es-discuss mailing list
> es-discuss at mozilla.org
*'I am what I am because of who we all are'*
*-- Hemanth HM *
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss