Follow-up to the first round of review comments: - Guard `document.fonts` add/removeEventListener with feature detection. Without the guard, environments where FontFaceSet doesn't expose EventTarget (jsdom test mocks, older browsers) threw a TypeError during xterm init and the terminal silently failed to attach. - Update DirectTerminal.render.test.tsx mock so `document.fonts` exposes addEventListener/removeEventListener stubs, restoring happy-path coverage of the init code path. - Export `resolveMonoFontFamily` and add unit tests covering: CSS var present (prepended to fallback), CSS var absent (fallback only), and the invariant that no `var(...)` token ever leaks into the output. - Clarify in the docblock why we read `--font-jetbrains-mono` and deliberately avoid `--font-mono` (the latter re-wraps in `var(...)` and would re-introduce the bug). Co-Authored-By: Claude Opus 4 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ao | ||
| cli | ||
| core | ||
| integration-tests | ||
| plugins | ||
| web | ||