Re: The enumerate trap and Object.create()
Gary Guo
nbdd0121 at hotmail.com
Fri Jan 30 21:26:45 PST 2015
Seems a serious problem, but could be easily fixed (I think).
For Example, this could be used as [[Enumerate]] for ordinary objects:
9.1.11 [[Enumerate]]([visitedSet])
When the [[Enumerate]] internal method of O and optional argument visitedSet is called the following steps are taken
Return an Iterator object, whose next method conforms to the following steps.
If visitedSet does not exist, let visitedSet be an empty set
Let allKeys be a list that contain of all property names of O
For each property key in allKeys
If visitedSet does not contains key and key is an enumerable property of O
Add key to visitedSet
Yield key
Let proto be the result of calling [[GetPrototypeOf]] internal method of O
Let protoIterator be the result of calling [[Enumerate]] internal method of proto
Yield* protoIterator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150131/f4b106c3/attachment.html>
-------------- next part --------------
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
More information about the es-discuss
mailing list