Apply suggestions from code review

Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
This commit is contained in:
Pierre Tachoire
2025-12-29 12:08:07 +01:00
committed by GitHub
parent 76f30dc985
commit 27f6f4243f

View File

@@ -2599,13 +2599,13 @@ pub fn insertText(self: *Page, v: []const u8) !void {
// Or append the value // Or append the value
const current_value = input.getValue(); const current_value = input.getValue();
const new_value = try std.mem.concat(self.arena, u8, &.{ current_value, v }); const new_value = try std.mem.concat(self.arena, u8, &.{ current_value, v });
try input.setValue(new_value, self); return input.setValue(new_value, self);
} }
if (html_element.is(Element.Html.TextArea)) |textarea| { if (html_element.is(Element.Html.TextArea)) |textarea| {
const current_value = textarea.getValue(); const current_value = textarea.getValue();
const new_value = try std.mem.concat(self.arena, u8, &.{ current_value, v }); const new_value = try std.mem.concat(self.arena, u8, &.{ current_value, v });
try textarea.setValue(new_value, self); return textarea.setValue(new_value, self);
} }
} }