Re:I'll sue you if you use my common-sense JavaScript tests
by thaumaturgy on Monday December 14, 2009 @09:02PM
(#995640)
And this is fine in theory. I agree, as I think most other Javascript programmers do now.
However, I have a challenge for you: calculate the browser window's width in pixels, before the page is done loading, and return the correct value without doing any browser sniffing.
Enjoy. :-)
Instead of detecting which browser you are using based on which features you support, the script should check to see if the features it wants to use exist, and if so use them.
So, instead of:
You do: Even closer to the point, he means that these are both bad form: