mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 14:33:47 +00:00
axnode: ignore non-html tags
This commit is contained in:
@@ -899,9 +899,14 @@ fn isIgnore(self: AXNode, page: *Page) bool {
|
|||||||
const node = self.dom;
|
const node = self.dom;
|
||||||
const role_attr = self.role_attr;
|
const role_attr = self.role_attr;
|
||||||
|
|
||||||
if (node.is(DOMNode.Element.Html) == null) {
|
// Don't ignore non-Element node: CData, Document...
|
||||||
|
if (node.is(DOMNode.Element) == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Ignore non-HTML elements: svg...
|
||||||
|
if (node.is(DOMNode.Element.Html) == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
const elt = node.as(DOMNode.Element);
|
const elt = node.as(DOMNode.Element);
|
||||||
const tag = elt.getTag();
|
const tag = elt.getTag();
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
|
|||||||
Reference in New Issue
Block a user