From 3fd91499178ed852f7567da30a0638167f1e41bc Mon Sep 17 00:00:00 2001 From: Francis Bouvier Date: Wed, 15 Jul 2026 12:44:13 +0200 Subject: [PATCH] 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 --- src/browser/webapi/element/svg/A.zig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/browser/webapi/element/svg/A.zig b/src/browser/webapi/element/svg/A.zig index ed068c504..9cad91395 100644 --- a/src/browser/webapi/element/svg/A.zig +++ b/src/browser/webapi/element/svg/A.zig @@ -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, .{}); };