It would be great if Modernizr could tell us what mode IE8 was running in, so that we could tune our CSS on IE for speed when a not-so-fast engine was being used.
P.s. I know you know a little about this, since I learned about it from you in a wonderfully-comprhensive presentation you gave. Thanks!
i think its this:
isIE8Compat = !window.addEventListener && document.documentMode && document.documentMode == 7;
Can you give more information on what you're doing with this? Basically performance optimization based on assumption of a slower engine?
yep, just for performance. I want to use lighter CSS unless I'm on the fast IE8 engine.
Hmmm. we'll talk about it but not sure it'll make it in. we mostly like to focus on universal and spec'd features, rather than identifying bugs or what have you.
It'd make a lot of sense to do this after your script include:
return !window.addEventListener && document.documentMode && document.documentMode == 7;
I just tested it out and it works beautifully. :)
Sweet, I'll use that technique and add the necessary classes to the body tag. Thanks!
This is the full test that I eventually got sorted out, and which Erich was looking for:
We should cross-test that solution with the one Paul listed above to see if the results match up. This could be important, and I think it might be worthwhile to add it to Modernizr directly, rather than as an addTest().
Closing in lieu of future Modernizr plans.
ie8 compat mode. ref #46