2014-05-09 9:57 GMT+02:00 David Bruant <[email protected]>: > Just to try to assess the unlikelihood and understand the cases where a > ES5 code expectations aren't met: > > The only case where ES6 and ES5 may diverge is for > Object.getOwnPropertyDescriptor > where a Proxy may return something that cannot be expected from any ES5 > object. > The after-trap completes the property descriptor (and when completing > picks specifically only data or accessor property), so code that expects a > complete property descriptor cannot be broken. > However, a divergence may only occur if, for instance, the code loops over > the property descriptor properties or expects exactly 4 properties. > > Is that correct or am I missing cases?
Another possibility would be that existing client code itself extends property descriptors with new attributes (since descriptors returned by gOPD are always extensible), and can then get confused when proxies pre-populate these descriptors with their own custom attributes. But again, this is highly unlikely. I think allowing proxies to accept/return custom attributes remains feasible.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

