(t: BrowserTarget, indent: number)
| 12 | p.load(); |
| 13 | |
| 14 | const logTarget = (t: BrowserTarget, indent: number) => { |
| 15 | const s = ' '.repeat(indent); |
| 16 | p.log( |
| 17 | `${s}${t.type()} "${t.name()}" [thread "${t.scriptUrlToUrl('')}"]${ |
| 18 | t.fileName() ? ' @ ' + t.fileName() : '' |
| 19 | }`, |
| 20 | ); |
| 21 | const children = t.children(); |
| 22 | children.sort((t1, t2) => { |
| 23 | return t1.name().localeCompare(t2.name()); |
| 24 | }); |
| 25 | children.forEach(child => logTarget(child as BrowserTarget, indent + 2)); |
| 26 | }; |
| 27 | |
| 28 | await new Promise<void>(f => { |
| 29 | r.onSessionCreated(() => { |
no test coverage detected