(base, props)
| 5623 | } |
| 5624 | |
| 5625 | function createObj(base, props) { |
| 5626 | function Obj() {} |
| 5627 | Obj.prototype = base; |
| 5628 | var inst = new Obj(); |
| 5629 | if (props) copyObj(props, inst); |
| 5630 | return inst; |
| 5631 | } |
| 5632 | |
| 5633 | function copyObj(obj, target) { |
| 5634 | if (!target) target = {}; |