Decoupling [ ] and Property Access and the DOM (Was: Why not NodeList#forEach :\?)

Erik Arvidsson erik.arvidsson at gmail.com
Tue Jun 19 11:00:34 PDT 2012


On Tue, Jun 19, 2012 at 10:45 AM, Allen Wirfs-Brock
<allen at wirfs-brock.com> wrote:
> There are various differences between @elementGet and @elementSet and proxy get/set handlers.  One is that the index value isn't coerced to a string before being passed to @elementGet/@elementSet

That's a good point.

For expressing the DOM APIs in JS this feature is not needed so I
still stand by my point; If you are using proxies for DOM then you do
not need to use @elementGet and @elementSet (for the current DOM
APIs).

@elementGet and @elementSet are still useful for things like better
collection APIs.

-- 
erik


More information about the es-discuss mailing list