Home / Function/ inject() — react Function Reference

inject() — react Function Reference

Architecture documentation for the inject() function in devtools.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a9e5982a_a580_dfe5_4c03_8fd0ae7c065f["inject()"]
  845af5f3_68dc_5673_3728_e66cd88a1b6f["devtools.js"]
  a9e5982a_a580_dfe5_4c03_8fd0ae7c065f -->|defined in| 845af5f3_68dc_5673_3728_e66cd88a1b6f
  5c29d355_c69e_7416_3f04_dbc1bcf01bec["init()"]
  5c29d355_c69e_7416_3f04_dbc1bcf01bec -->|calls| a9e5982a_a580_dfe5_4c03_8fd0ae7c065f
  style a9e5982a_a580_dfe5_4c03_8fd0ae7c065f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shell/src/perf-regression/devtools.js lines 18–23

function inject(contentDocument, sourcePath) {
  const script = contentDocument.createElement('script');
  script.src = sourcePath;

  ((contentDocument.body: any): HTMLBodyElement).appendChild(script);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does inject() do?
inject() is a function in the react codebase, defined in packages/react-devtools-shell/src/perf-regression/devtools.js.
Where is inject() defined?
inject() is defined in packages/react-devtools-shell/src/perf-regression/devtools.js at line 18.
What calls inject()?
inject() is called by 1 function(s): init.

Analyze Your Own Codebase

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

Try Supermodel Free