(contentDocument, sourcePath, callback)
| 22 | import {__DEBUG__} from 'react-devtools-shared/src/constants'; |
| 23 | |
| 24 | function inject(contentDocument, sourcePath, callback) { |
| 25 | const script = contentDocument.createElement('script'); |
| 26 | script.onload = callback; |
| 27 | script.src = sourcePath; |
| 28 | |
| 29 | ((contentDocument.body: any): HTMLBodyElement).appendChild(script); |
| 30 | } |
| 31 | |
| 32 | function init(appIframe, devtoolsContainer, appSource) { |
| 33 | const {contentDocument, contentWindow} = appIframe; |