Lines Matching refs:target
69 assert (JSON.stringify (o1) === '{"a":1,"b":2,"c":3}'); //target object itself is changed.
104 var target = Object.defineProperty ({}, 'foo', {
107 }); // target.foo is a read-only property
110 // TypeError: "foo" is read-only,the Exception is thrown when assigning target.foo
111 Object.assign (target, { bar: 2 }, { foo2: 3, foo: 3, foo3: 3 }, { baz: 4 });
117 assert (target.bar === 2); // the first source was copied successfully.
118 assert (target.foo2 === 3); // the first property of the second source was copied successfully.
119 assert (target.foo === 1); // exception is thrown here.
120 assert (target.foo3 === undefined); // assign method has finished, foo3 will not be copied.
121 assert (target.baz === undefined); // the third source will not be copied either.
136 function completeAssign (target, sources) {
143 Object.defineProperties (target, descriptors);
145 return target;
152 // Test when target is not coercible to object