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

Function hasLoadingSpinner

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

Source from the content-addressed store, hash-verified

54
55// Check if the node or any of its children contains a loading spinner
56export function hasLoadingSpinner(node: Node): boolean {
57 if (node.nodeType === Node.TEXT_NODE) return false;
58
59 // Type guard to check if the node is an Element
60 if (node instanceof Element && node.classList.contains('fluent-read-loading')) return true;
61
62 // Check children only if the node is an Element
63 if (node instanceof Element) {
64 return Array.from(node.children).some(child => hasLoadingSpinner(child));
65 }
66
67 return false;
68}
69
70// Check if the node or any of its children contains a retry tag
71export function hasRetryTag(node: Node): boolean {

Callers 1

skipNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected