diff --git a/nativescript-core/xhr/xhr.ts b/nativescript-core/xhr/xhr.ts index 24430c65d..f0b7b5f73 100644 --- a/nativescript-core/xhr/xhr.ts +++ b/nativescript-core/xhr/xhr.ts @@ -166,7 +166,7 @@ export class XMLHttpRequest { private _listeners: Map> = new Map>(); public addEventListener(eventName: string, handler: Function) { - if (eventName !== "load" && eventName !== "error" && eventName !== "progress") { + if (["abort", "error", "load", "loadend", "loadstart", "progress", "readystatechange"].indexOf(eventName) === -1) { throw new Error("Event not supported: " + eventName); }