( appSource: string, appIframe: HTMLIFrameElement, devtoolsContainer: HTMLElement, loadDevToolsButton: HTMLButtonElement, )
| 23 | } |
| 24 | |
| 25 | function init( |
| 26 | appSource: string, |
| 27 | appIframe: HTMLIFrameElement, |
| 28 | devtoolsContainer: HTMLElement, |
| 29 | loadDevToolsButton: HTMLButtonElement, |
| 30 | ) { |
| 31 | const {contentDocument, contentWindow} = appIframe; |
| 32 | |
| 33 | initializeBackend(contentWindow); |
| 34 | |
| 35 | inject(contentDocument, appSource); |
| 36 | |
| 37 | loadDevToolsButton.addEventListener('click', () => { |
| 38 | const DevTools = createDevTools(contentWindow); |
| 39 | createRoot(devtoolsContainer).render( |
| 40 | <DevTools |
| 41 | hookNamesModuleLoaderFunction={hookNamesModuleLoaderFunction} |
| 42 | showTabBar={true} |
| 43 | />, |
| 44 | ); |
| 45 | activateBackend(contentWindow); |
| 46 | }); |
| 47 | } |
| 48 | |
| 49 | init( |
| 50 | 'dist/perf-regression-app.js', |
no test coverage detected