From 54a807bb36a454b42577d4a4341d1883a03b112b Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 12 Feb 2024 21:59:59 +0100 Subject: [PATCH] xhr: add abort func --- src/xhr/xhr.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xhr/xhr.zig b/src/xhr/xhr.zig index 2ad43027..85346770 100644 --- a/src/xhr/xhr.zig +++ b/src/xhr/xhr.zig @@ -427,6 +427,10 @@ pub const XMLHttpRequest = struct { self.dispatchProgressEvent("loadend", .{}); } + pub fn _abort(self: *XMLHttpRequest) void { + self.onErr(DOMError.Abort); + } + pub fn get_responseType(self: *XMLHttpRequest) []const u8 { return switch (self.response_type) { .Empty => "",