(blob, kind)
| 545 | } |
| 546 | |
| 547 | private _read(blob, kind) { |
| 548 | if (!(blob instanceof Blob)) { |
| 549 | throw new TypeError(`Failed to execute '${kind}' on 'FileReader': parameter 1 is not of type 'Blob'.`); |
| 550 | } |
| 551 | |
| 552 | this._result = ''; |
| 553 | |
| 554 | setTimeout(() => { |
| 555 | this._readyState = this.LOADING; |
| 556 | this.emitEvent('load'); |
| 557 | this.emitEvent('loadend'); |
| 558 | }); |
| 559 | } |
| 560 | |
| 561 | private emitEvent(eventName: string, ...args: Array<any>) { |
| 562 | if (isFunction(this['on' + eventName])) { |
no test coverage detected