(base, props)
| 8352 | function nothing() {} |
| 8353 | |
| 8354 | function createObj(base, props) { |
| 8355 | var inst; |
| 8356 | if (Object.create) { |
| 8357 | inst = Object.create(base); |
| 8358 | } else { |
| 8359 | nothing.prototype = base; |
| 8360 | inst = new nothing(); |
| 8361 | } |
| 8362 | if (props) copyObj(props, inst); |
| 8363 | return inst; |
| 8364 | }; |
| 8365 | |
| 8366 | function copyObj(obj, target, overwrite) { |
| 8367 | if (!target) target = {}; |