mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
fix: XHR readystatechange event
This commit is contained in:
@ -166,7 +166,7 @@ export class XMLHttpRequest {
|
||||
private _listeners: Map<string, Array<Function>> = new Map<string, Array<Function>>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user