(line)
| 71 | } |
| 72 | |
| 73 | function log(line) { |
| 74 | // Gate browser-bridge PARPAR:* log entries behind the same diagEnabled |
| 75 | // toggle (``?parparDiag=1``) that already gates diag(). Without this, |
| 76 | // every production page load emitted PARPAR:worker-mode / |
| 77 | // PARPAR:startParparVmApp / PARPAR:appStarter-present regardless of |
| 78 | // context. Tests that *want* these — the Playwright harness passes |
| 79 | // parparDiag=1 — still get them. |
| 80 | if (!diagEnabled) { |
| 81 | return; |
| 82 | } |
| 83 | if (global.console && typeof global.console.log === 'function') { |
| 84 | global.console.log('PARPAR:' + line); |
| 85 | } |
| 86 | } |
| 87 | function diag(phase, key, value) { |
| 88 | if (!diagEnabled) { |
| 89 | return; |
no test coverage detected