feat(vom): function refactor

This commit is contained in:
Ljy-0827
2026-08-24 14:06:42 +08:00
parent 4b6cdde168
commit b7e62d8cf1
13 changed files with 1529 additions and 801 deletions
+4 -1
View File
@@ -199,7 +199,10 @@ function shouldRender(node: VomNode): boolean {
}
export function isVomReferenceNode(node: VomNode): boolean {
return INTERACTIVE_ROLES.has(normalizedRole(node)) || isUrlBearingStructuralAction(node);
return (
node.referenceable !== false &&
(INTERACTIVE_ROLES.has(normalizedRole(node)) || isUrlBearingStructuralAction(node))
);
}
function hasRecoveryHandler(node: VomNode): boolean {
+2
View File
@@ -24,6 +24,8 @@ export interface VomNode {
backendNodeId?: number;
frameId?: string;
contextScopeId?: string;
/** False for semantic-only nodes that cannot be addressed through CDP. */
referenceable?: boolean;
role?: string;
name?: string;