Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add IE8 "mode" detection #46

Closed
erichocean opened this Issue · 8 comments

3 participants

Erich Ocean Paul Irish Faruk Ateş
Erich Ocean

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!

Paul Irish
Owner

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?

Erich Ocean

yep, just for performance. I want to use lighter CSS unless I'm on the fast IE8 engine.

Paul Irish
Owner

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:
Modernizr.addTest('ie8compat',function(){
return !window.addEventListener && document.documentMode && document.documentMode == 7;
});

I just tested it out and it works beautifully. :)

Erich Ocean

Sweet, I'll use that technique and add the necessary classes to the body tag. Thanks!

Erich Ocean

Closing...

Paul Irish
Owner

closed. :)

Faruk Ateş
Owner

This is the full test that I eventually got sorted out, and which Erich was looking for:

http://farukat.es/journal/2009/05/250-ie8-x-ua-compatible-solutions

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().

Faruk Ateş
Owner

Closing in lieu of future Modernizr plans.

phistuck phistuck referenced this issue from a commit
phistuck phistuck ie8 compat mode. ref #46 d9108ed
patrick kettner patrickkettner referenced this issue from a commit in patrickkettner/Modernizr
Paul Irish paulirish ie8 compat mode. ref #46 4d22730
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.