Home / Function/ stripExternalRuntimeInNodes() — react Function Reference

stripExternalRuntimeInNodes() — react Function Reference

Architecture documentation for the stripExternalRuntimeInNodes() function in FizzTestUtils.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  85593596_8abe_fcb3_5e53_7e7b058c87f8["stripExternalRuntimeInNodes()"]
  7c063c03_f497_41b6_7547_aff9bc8a9af7["FizzTestUtils.js"]
  85593596_8abe_fcb3_5e53_7e7b058c87f8 -->|defined in| 7c063c03_f497_41b6_7547_aff9bc8a9af7
  style 85593596_8abe_fcb3_5e53_7e7b058c87f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/test-utils/FizzTestUtils.js lines 125–140

function stripExternalRuntimeInNodes(
  nodes: HTMLElement[] | HTMLCollection<HTMLElement>,
  externalRuntimeSrc: string | null,
): HTMLElement[] {
  if (!Array.isArray(nodes)) {
    nodes = Array.from(nodes);
  }
  if (externalRuntimeSrc == null) {
    return nodes;
  }
  return nodes.filter(
    n =>
      (n.tagName !== 'SCRIPT' && n.tagName !== 'script') ||
      n.getAttribute('src') !== externalRuntimeSrc,
  );
}

Domain

Subdomains

Frequently Asked Questions

What does stripExternalRuntimeInNodes() do?
stripExternalRuntimeInNodes() is a function in the react codebase, defined in packages/react-dom/src/test-utils/FizzTestUtils.js.
Where is stripExternalRuntimeInNodes() defined?
stripExternalRuntimeInNodes() is defined in packages/react-dom/src/test-utils/FizzTestUtils.js at line 125.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free