We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be27359 commit aeaa745Copy full SHA for aeaa745
src/html/window.zig
@@ -105,8 +105,12 @@ pub const Window = struct {
105
return self.timeoutid;
106
}
107
108
- pub fn _clearTimeout(self: *Window, loop: *Loop, id: u32) !void {
109
- if (id >= self.timeoutid) return error.InvalidTimeoutId;
+ pub fn _clearTimeout(self: *Window, loop: *Loop, id: u32) void {
+ // I do would prefer return an error in this case, but it seems some JS
110
+ // uses invalid id, in particular id 0.
111
+ // So we silently ignore invalid id for now.
112
+ if (id >= self.timeoutid) return;
113
+
114
loop.cancel(self.timeoutids[id], null);
115
116
};
0 commit comments