On Sat, Oct 19, 2013 at 10:25 AM, teramako <teram...@gmail.com> wrote:
> Hi > > I believe Object.assign never update the target's [[prototype]]. But > current rev19 spec is using Put. So I'm afraid of following case will > update the [[prototype]]. > > var soruce = {}; > Object.defineProperty(source, "__proto__", { > value: { a: "A", b: "B" }, > enumerable: true > }); > var target = {}; > Object.assign(target, source); > > Is this expected result ? and is there a plan to change to > DefinePropertyOrThrow from Put ? > Object.assign is essentially a "batch property assignment with Put"; I believe what you're describing above is Object.mixin, which is "batch property definition with DefinePropertyOrThrow". Rick
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss