Home / Function/ createNode() — react Function Reference

createNode() — react Function Reference

Architecture documentation for the createNode() function in getNodeForCharacterOffset-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  5fd9aa10_e0fb_6134_dd2c_5c11758e6599["createNode()"]
  37a83c79_305f_762b_998f_b5b9e91ecec3["getNodeForCharacterOffset-test.js"]
  5fd9aa10_e0fb_6134_dd2c_5c11758e6599 -->|defined in| 37a83c79_305f_762b_998f_b5b9e91ecec3
  9a93dcd3_5ba7_a860_361b_390021f8bab3["getTestDocument()"]
  5fd9aa10_e0fb_6134_dd2c_5c11758e6599 -->|calls| 9a93dcd3_5ba7_a860_361b_390021f8bab3
  style 5fd9aa10_e0fb_6134_dd2c_5c11758e6599 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/client/__tests__/getNodeForCharacterOffset-test.js lines 17–21

function createNode(html) {
  const node = (getTestDocument() || document).createElement('div');
  node.innerHTML = html;
  return node;
}

Domain

Subdomains

Frequently Asked Questions

What does createNode() do?
createNode() is a function in the react codebase, defined in packages/react-dom/src/client/__tests__/getNodeForCharacterOffset-test.js.
Where is createNode() defined?
createNode() is defined in packages/react-dom/src/client/__tests__/getNodeForCharacterOffset-test.js at line 17.
What does createNode() call?
createNode() calls 1 function(s): getTestDocument.

Analyze Your Own Codebase

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

Try Supermodel Free