axnode: ignore script and style children

This commit is contained in:
Pierre Tachoire
2026-01-16 08:28:16 +01:00
parent 50c1e2472b
commit a358c46b9f

View File

@@ -801,6 +801,7 @@ fn writeName(axnode: AXNode, w: anytype, page: *Page) !?AXSource {
.object, .progress, .meter, .main, .nav, .aside, .header, .object, .progress, .meter, .main, .nav, .aside, .header,
.footer, .form, .section, .article, .ul, .ol, .dl, .menu, .footer, .form, .section, .article, .ul, .ol, .dl, .menu,
.thead, .tbody, .tfoot, .tr, .td, .div, .span, .p, .details, .li, .thead, .tbody, .tfoot, .tr, .td, .div, .span, .p, .details, .li,
.style, .script,
// zig fmt: on // zig fmt: on
=> {}, => {},
else => { else => {
@@ -891,7 +892,7 @@ fn ignoreChildren(self: AXNode) bool {
const elt = node.as(DOMNode.Element); const elt = node.as(DOMNode.Element);
return switch (elt.getTag()) { return switch (elt.getTag()) {
.head => true, .head, .script, .style => true,
else => false, else => false,
}; };
} }