All the noise we made about Object.extend was unclear? From jQuery:
>
> https://github.com/jquery/**jquery/blob/master/src/core.**js#L157<https://github.com/jquery/jquery/blob/master/src/core.js#L157>
>
> Many similar functions, going back to Prototype's Object.extend:
>
> Object.extend = function(destination, source) {
> for (var property in source)
> destination[property] = source[property];
> return destination;
> };
>
Thanks. I believe this supports my position. Regardless of how @iterator
is defined, consider this:
extendObject(target, someObjectWithIterator);
If `someObjectWithIterator` has an @iterator method (be it string or symbol
keyed), I would expect that after this statement runs, `target` would also
have that @iterator method. To write it a different way:
extendObject(target, {
"@iterator"() {}
});
Or:
extendObject(target, {
[Symbol.iterator]() {}
});
Either way I would be surprised if the "iterator" function was **not**
copied. I think this example argues for enumerability, at least in some
cases. Or equivalently, not all meta-level hooks appear to want
non-enumerability.
{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss