MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / _read

Method _read

packages/core/xhr/index.ts:547–559  ·  view source on GitHub ↗
(blob, kind)

Source from the content-addressed store, hash-verified

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])) {

Callers 3

readAsDataURLMethod · 0.95
readAsTextMethod · 0.95
readAsArrayBufferMethod · 0.95

Calls 2

emitEventMethod · 0.95
setTimeoutFunction · 0.50

Tested by

no test coverage detected