denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.16k stars 5.4k forks source link

Add `navigator.platform` #24117

Open kt3k opened 5 months ago

kt3k commented 5 months ago

navigator.platform is available in many runtimes such as: Browsers, Node.js (>=v21, experimental), and Bun. If this is available in Deno, platform detection can be very easily done in a cross-runtime way.

kt3k commented 5 months ago

related: https://github.com/nodejs/node/pull/50385

iuioiua commented 5 months ago

I think we should do this, even though it's deprecated (documentation).