| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
create sets the [[Prototype]] of the created object to first parameter. |
| 7 |
This can be checked using isPrototypeOf, or getPrototypeOf. |
| 8 |
es5id: 15.2.3.5-2-1 |
| 9 |
description: Object.create creates new Object |
| 10 |
---*/ |
| 11 |
|
| 12 |
function base() {} |
| 13 |
var b = new base(); |
| 14 |
var prop = new Object(); |
| 15 |
var d = Object.create(b); |
| 16 |
|
| 17 |
assert.sameValue(typeof d, 'object', 'typeof d'); |