Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Figure out how to allow setting properties without falling of spec'd path #9
Current spec text says
Unfortunately, the [[DefineOwnProperty]] method is triggered during OrdinarySet, both when updating an existing own property and when setting a new property. That means the spec text, as written, allows engines to do whatever they want as soon as sets or updates a property on the object or its prototype. And that means that one of the real constraints is not captured, namely, "properties which are added to the base object being iterated after iteration begins are not returned".
I (or someone) should figure out how to avoid this. Maybe it is possible to say something like "[[DefineOwnProperty]], except when called via OrdinarySet on O"?