You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 ofDeno
orBun
inglobalThis
.Having
navigator.userAgentData
built in would provide a clean and consistent way to detect key runtime details such as: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.
The text was updated successfully, but these errors were encountered: