* 构造类继承关系 * * @memberOf module:zrender/core/util * @param {Function} clazz 源类 * @param {Function} baseClazz 基类
(clazz, baseClazz)
| 481 | * @param {Function} baseClazz 基类 |
| 482 | */ |
| 483 | function inherits(clazz, baseClazz) { |
| 484 | var clazzPrototype = clazz.prototype; |
| 485 | function F() {} |
| 486 | F.prototype = baseClazz.prototype; |
| 487 | clazz.prototype = new F(); |
| 488 | |
| 489 | for (var prop in clazzPrototype) { |
| 490 | if (clazzPrototype.hasOwnProperty(prop)) { |
| 491 | clazz.prototype[prop] = clazzPrototype[prop]; |
| 492 | } |
| 493 | } |
| 494 | clazz.prototype.constructor = clazz; |
| 495 | clazz.superClass = baseClazz; |
| 496 | } |
| 497 | |
| 498 | /** |
| 499 | * @memberOf module:zrender/core/util |
no outgoing calls
no test coverage detected