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 | |
| 27 | function 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 | |
| 35 | function init(appIframe, devtoolsContainer, appSource) { |
| 36 | const {contentDocument, contentWindow} = appIframe; |
Tested by
no test coverage detected