Skip to content

Implement navigator.userAgentData as a built-in API #58498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jimmywarting opened this issue May 28, 2025 · 2 comments
Open

Implement navigator.userAgentData as a built-in API #58498

jimmywarting opened this issue May 28, 2025 · 2 comments

Comments

@jimmywarting
Copy link

I’d like to suggest implementing navigator.userAgentData as a built-in global API.

This would help bring better support for web-standard APIs and improve feature parity between browser and runtime environments. It's especially useful in universal (isomorphic) codebases where one shouldn't have to rely on environment-specific globals like process, or check for the presence of Deno or Bun in globalThis.

Having navigator.userAgentData built in would provide a clean and consistent way to detect key runtime details such as:

  • the brand (e.g. Deno, Bun, Node)
  • the version of the runtime
  • the platform (e.g. macOS, Windows, Linux, etc.)

This would be highly useful in scenarios where server-side code needs to branch based on the environment but still adhere to web platform standards. It removes the need for runtime-specific APIs like process.version or string parsing from user agent headers.

Please consider supporting this as a native part of the runtime.

@symonbaikov
Copy link

I want to implement that logic.

@Delapouite
Copy link
Contributor

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

No branches or pull requests

3 participants