Skip to content

Commit

Permalink
xhr: add abort func
Browse files Browse the repository at this point in the history
  • Loading branch information
krichprollsch committed Feb 12, 2024
1 parent 3c5e23e commit d508633
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xhr/xhr.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 => "",
Expand Down

0 comments on commit d508633

Please sign in to comment.