wana
wana copied to clipboard
Object.keys observes value changes
Ideally, the Object.keys shim should only observe key changes (eg: when a key is added or removed). Currently, it observes value changes too (eg: when a key is set to a new value).
Note: This goes for Map.prototype.keys as well.
Q: Should using Object.keys on an array observe its length or its sparse indices? Probably the latter, since that's what affects the result of Object.keys.