Skip to content

feat: add measurement host config entrypoint#72

Open
Huxpro wants to merge 2 commits intochenglou:mainfrom
Huxpro:codex/measurement-host-config
Open

feat: add measurement host config entrypoint#72
Huxpro wants to merge 2 commits intochenglou:mainfrom
Huxpro:codex/measurement-host-config

Conversation

@Huxpro
Copy link
Copy Markdown

@Huxpro Huxpro commented Apr 1, 2026

Summary

  • add a createPretext({ measurement }) host-config entrypoint for binding platform-specific measurement backends
  • preserve the default browser entrypoint while exposing a new ./host export for embedders
  • add host-config coverage in tests and document the design rationale

Why

Lynx and similar runtimes need to swap out only the text measurement backend without forking the rest of the layout engine. This PR adds that seam while keeping the default browser usage unchanged.

Test Plan

  • bun test src/layout.test.ts
  • bun run check
  • bun run build:package
  • bun run package-smoke-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant