MCPcopy
hub / github.com/facebook/react / inject

Function inject

packages/react-devtools-shell/src/e2e/devtools.js:27–33  ·  packages/react-devtools-shell/src/e2e/devtools.js::inject
(contentDocument, sourcePath, callback)

Source from the content-addressed store, hash-verified

25}
26
27function inject(contentDocument, sourcePath, callback) {
28 const script = contentDocument.createElement(class="st">'script');
29 script.onload = callback;
30 script.src = sourcePath;
31
32 ((contentDocument.body: any): HTMLBodyElement).appendChild(script);
33}
34
35function init(appIframe, devtoolsContainer, appSource) {
36 const {contentDocument, contentWindow} = appIframe;

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected