(base, props)
| 8320 | function nothing() {} |
| 8321 | |
| 8322 | function createObj(base, props) { |
| 8323 | var inst; |
| 8324 | if (Object.create) { |
| 8325 | inst = Object.create(base); |
| 8326 | } else { |
| 8327 | nothing.prototype = base; |
| 8328 | inst = new nothing(); |
| 8329 | } |
| 8330 | if (props) copyObj(props, inst); |
| 8331 | return inst; |
| 8332 | }; |
| 8333 | |
| 8334 | function copyObj(obj, target, overwrite) { |
| 8335 | if (!target) target = {}; |