From 367d20d39f07b544ba08630e9cf525107ed4d4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= Date: Tue, 31 Mar 2026 05:20:32 +0200 Subject: [PATCH] SemanticTree: simplify lp.String.wrap calls --- src/SemanticTree.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SemanticTree.zig b/src/SemanticTree.zig index bc602f8a..42e5335c 100644 --- a/src/SemanticTree.zig +++ b/src/SemanticTree.zig @@ -159,7 +159,7 @@ fn walk( if (el.is(Element.Html.Input)) |input| { value = input.getValue(); - if (el.getAttributeSafe(comptime lp.String.wrap("list"))) |list_id| { + if (el.getAttributeSafe(comptime .wrap("list"))) |list_id| { options = try extractDataListOptions(list_id, self.page, self.arena); } } else if (el.is(Element.Html.TextArea)) |textarea| { @@ -641,11 +641,11 @@ pub fn getNodeDetails(node: *Node, registry: *CDPNode.Registry, page: *Page, are if (node.is(Element)) |el| { tag_name = el.getTagNameLower(); is_disabled = el.isDisabled(); - id_attr = el.getAttributeSafe(comptime lp.String.wrap("id")); - class_attr = el.getAttributeSafe(comptime lp.String.wrap("class")); - placeholder = el.getAttributeSafe(comptime lp.String.wrap("placeholder")); + id_attr = el.getAttributeSafe(comptime .wrap("id")); + class_attr = el.getAttributeSafe(comptime .wrap("class")); + placeholder = el.getAttributeSafe(comptime .wrap("placeholder")); - if (el.getAttributeSafe(comptime lp.String.wrap("href"))) |h| { + if (el.getAttributeSafe(comptime .wrap("href"))) |h| { const URL = lp.URL; href = URL.resolve(arena, page.base(), h, .{ .encode = true }) catch h; } @@ -656,7 +656,7 @@ pub fn getNodeDetails(node: *Node, registry: *CDPNode.Registry, page: *Page, are if (input._input_type == .checkbox or input._input_type == .radio) { checked = input.getChecked(); } - if (el.getAttributeSafe(comptime lp.String.wrap("list"))) |list_id| { + if (el.getAttributeSafe(comptime .wrap("list"))) |list_id| { options = try extractDataListOptions(list_id, page, arena); } } else if (el.is(Element.Html.TextArea)) |textarea| {