(base, props)
| 8084 | function nothing() {} |
| 8085 | |
| 8086 | function createObj(base, props) { |
| 8087 | var inst; |
| 8088 | if (Object.create) { |
| 8089 | inst = Object.create(base); |
| 8090 | } else { |
| 8091 | nothing.prototype = base; |
| 8092 | inst = new nothing(); |
| 8093 | } |
| 8094 | if (props) copyObj(props, inst); |
| 8095 | return inst; |
| 8096 | }; |
| 8097 | |
| 8098 | function copyObj(obj, target, overwrite) { |
| 8099 | if (!target) target = {}; |