Skip to content

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

@jimmywarting

Description

@jimmywarting

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions