4 ms·
A trivial way to check for Firefox in javascript: !!{}.toSource There are many others, of course.
by ryan-c 7y ago
A trivial way to check for Firefox in javascript:
!!{}.toSource
There are many others, of course.
- ryannevius 7y agoFor 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/Reference/Global_Objects/Boolean/toSource https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...