MCPcopy
hub / github.com/Bistutu/FluentRead / hasRetryTag

Function hasRetryTag

entrypoints/utils/check.ts:71–83  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

69
70// Check if the node or any of its children contains a retry tag
71export function hasRetryTag(node: Node): boolean {
72 if (node.nodeType === Node.TEXT_NODE) return false;
73
74 // Type guard to check if the node is an Element
75 if (node instanceof Element && node.classList.contains('fluent-read-failure')) return true;
76
77 // Check children only if the node is an Element
78 if (node instanceof Element) {
79 return Array.from(node.children).some(child => hasRetryTag(child));
80 }
81
82 return false;
83}
84
85// Search for a node with a specific class name
86export function searchClassName(node: Node, className: string): Node | null {

Callers 1

skipNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected