Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
ryan-c
7y ago
0 comments
Save
Share
A trivial way to check for Firefox in javascript:
!!{}.toSource
There are many others, of course.
0 comments
1 comments · 1 top-level
top
newest
oldest
ryannevius
7y ago
For others who may be wondering, this is because `Boolean.prototype.toSource()` is a non-standard method that is only supported by Firefox:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
j
/
k
navigate · click thread line to collapse