add dummy scrollIntoView

This commit is contained in:
Karl Seguin
2026-02-02 16:41:39 +08:00
parent 7c98a27c53
commit ce7989c171

View File

@@ -1255,6 +1255,14 @@ pub fn scrollIntoViewIfNeeded(_: *const Element, center_if_needed: ?bool) void {
_ = center_if_needed; _ = center_if_needed;
} }
const ScrollIntoViewOpts = union {
align_to_top: bool,
obj: js.Object,
};
pub fn scrollIntoView(_: *const Element, opts: ?ScrollIntoViewOpts) void {
_ = opts;
}
pub fn format(self: *Element, writer: *std.Io.Writer) !void { pub fn format(self: *Element, writer: *std.Io.Writer) !void {
try writer.writeByte('<'); try writer.writeByte('<');
try writer.writeAll(self.getTagNameDump()); try writer.writeAll(self.getTagNameDump());
@@ -1597,6 +1605,7 @@ pub const JsApi = struct {
pub const children = bridge.accessor(Element.getChildren, null, .{}); pub const children = bridge.accessor(Element.getChildren, null, .{});
pub const focus = bridge.function(Element.focus, .{}); pub const focus = bridge.function(Element.focus, .{});
pub const blur = bridge.function(Element.blur, .{}); pub const blur = bridge.function(Element.blur, .{});
pub const scrollIntoView = bridge.function(Element.scrollIntoView, .{});
pub const scrollIntoViewIfNeeded = bridge.function(Element.scrollIntoViewIfNeeded, .{}); pub const scrollIntoViewIfNeeded = bridge.function(Element.scrollIntoViewIfNeeded, .{});
}; };