Browser Detection

Browser.js in Core includes a browser detection variables added to the Browser hash object. For the most part, MooTools smooths over the differences between browsers and you shouldn't find yourself needing to reference these variables very often. However, there are times when you need to know, and MooTools provides.

There's not a lot to describe here other than these things exist and you can use them in your code. For exampe, let's say you wanted to work around some IE6 bug:

...
if (Browser.Engine.trident4) //...do something for IE6
else if (Browser.Engine.trident) //...do something for all other version of IE
else //...everyone else gets some standard behavior
...

You can find all the Browser properties in the docs.

mootorial/01-core/01-browser.txt · Last modified: 2009/08/24 10:10 by aaron-n