xhr: add abort func

This commit is contained in:
Pierre Tachoire
2024-02-12 21:59:59 +01:00
parent ff754fc666
commit 54a807bb36

View File

@@ -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 => "",