webapi: move SVGAElement.getRelList out of the JsApi bridge block

Review pattern: the JsApi struct is for JS/v8 bridging only; the relList
getter is plain delegation with no v8 adaptation, so it moves to the
type and the bridge accessor references it.

Co-Authored-By: Karl Seguin <karlseguin@users.noreply.github.com>
This commit is contained in:
Francis Bouvier
2026-07-15 12:44:13 +02:00
committed by Karl Seguin
parent 1a51a2ec1d
commit 3fd9149917

View File

@@ -22,6 +22,7 @@ const Frame = @import("../../../Frame.zig");
const Node = @import("../../Node.zig");
const Element = @import("../../Element.zig");
const AnimatedString = @import("../../svg/AnimatedString.zig");
const DOMTokenList = @import("../../collections.zig").DOMTokenList;
const Graphics = @import("Graphics.zig");
@@ -35,6 +36,10 @@ pub fn asNode(self: *A) *Node {
return self.asElement().asNode();
}
pub fn getRelList(self: *A, frame: *Frame) !*DOMTokenList {
return self.asElement().getRelList(frame);
}
pub const JsApi = struct {
pub const bridge = js.Bridge(A);
@@ -49,8 +54,5 @@ pub const JsApi = struct {
return AnimatedString.getOrCreate(self.asElement(), .href, frame);
}
pub const relList = bridge.accessor(_getRelList, null, .{});
fn _getRelList(self: *A, frame: *Frame) !*@import("../../collections.zig").DOMTokenList {
return self.asElement().getRelList(frame);
}
pub const relList = bridge.accessor(A.getRelList, null, .{});
};