Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
How to Check Which JavaScript Runtime Is Running Your Code
(
vite.host
)
12 points
by
pmbanugo
on June 11, 2024
|
hide
|
past
|
favorite
|
3 comments
realPubkey
on June 11, 2024
[–]
Most of the time you should not even check for the runtime. Instead you should check for the specific feature support that you want to use.
c0balt
on June 11, 2024
|
parent
[–]
+1, though sometimes it's useful to know the runtime variant & version to implement workarounds for implementation quirks or polyfills.
dspillett
on June 11, 2024
|
root
|
parent
[–]
Or to aid recreating problems were, for instance, you've accidentally relied on undefined behaviour that happens to be consistent in most places.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: