mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
axnode: ignore script and style children
This commit is contained in:
@@ -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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user